From a081c43b4d0add598c904f997764e93d6b45dd6d Mon Sep 17 00:00:00 2001 From: David van der Spek Date: Mon, 18 Sep 2023 15:57:22 +0200 Subject: [PATCH] pipelines per component resources etc Signed-off-by: David van der Spek --- .../templates/api-server/deployment.yaml | 18 +- .../pipelines/templates/api-server/hpa.yaml | 32 ++ .../argo-workflow-controller/deployment.yaml | 10 +- .../argo-workflow-controller/hpa.yaml | 32 ++ .../templates/cache/server/deployment.yaml | 19 +- .../pipelines/templates/cache/server/hpa.yaml | 32 ++ .../templates/metadata/envoy/deployment.yaml | 21 +- .../templates/metadata/envoy/hpa.yaml | 32 ++ .../metadata/grpc-server/deployment.yaml | 19 +- .../templates/metadata/grpc-server/hpa.yaml | 32 ++ .../templates/metadata/writer/deployment.yaml | 19 +- .../templates/metadata/writer/hpa.yaml | 32 ++ .../persistence-agent/deployment.yaml | 19 +- .../templates/persistence-agent/hpa.yaml | 32 ++ .../scheduled-workflow/deployment.yaml | 19 +- .../templates/scheduled-workflow/hpa.yaml | 32 ++ .../viewer-controller/deployment.yaml | 19 +- .../templates/viewer-controller/hpa.yaml | 32 ++ .../visualization-server/deployment.yaml | 19 +- .../templates/visualization-server/hpa.yaml | 32 ++ .../templates/web-app/deployment.yaml | 23 +- .../helm/pipelines/templates/web-app/hpa.yaml | 18 +- .../pipelines/templates/web-app/service.yaml | 2 +- .../templates/web-app/virtualservice.yaml | 14 +- kubeflow/helm/pipelines/values.yaml | 372 +++++++++++++++--- 25 files changed, 752 insertions(+), 179 deletions(-) create mode 100644 kubeflow/helm/pipelines/templates/api-server/hpa.yaml create mode 100644 kubeflow/helm/pipelines/templates/argo-workflow-controller/hpa.yaml create mode 100644 kubeflow/helm/pipelines/templates/cache/server/hpa.yaml create mode 100644 kubeflow/helm/pipelines/templates/metadata/envoy/hpa.yaml create mode 100644 kubeflow/helm/pipelines/templates/metadata/grpc-server/hpa.yaml create mode 100644 kubeflow/helm/pipelines/templates/metadata/writer/hpa.yaml create mode 100644 kubeflow/helm/pipelines/templates/persistence-agent/hpa.yaml create mode 100644 kubeflow/helm/pipelines/templates/scheduled-workflow/hpa.yaml create mode 100644 kubeflow/helm/pipelines/templates/viewer-controller/hpa.yaml create mode 100644 kubeflow/helm/pipelines/templates/visualization-server/hpa.yaml diff --git a/kubeflow/helm/pipelines/templates/api-server/deployment.yaml b/kubeflow/helm/pipelines/templates/api-server/deployment.yaml index a9ee3ae95..ca750ee80 100644 --- a/kubeflow/helm/pipelines/templates/api-server/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/api-server/deployment.yaml @@ -5,15 +5,15 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.apiServer.autoscaling.enabled }} + replicas: {{ .Values.apiServer.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.apiServerSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.apiServer.podAnnotations }} annotations: cluster-autoscaler.kubernetes.io/safe-to-evict: "true" {{- toYaml . | nindent 8 }} @@ -27,11 +27,11 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-api-server securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.apiServer.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-api-server securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.apiServer.securityContext | nindent 12 }} image: "{{ .Values.apiServer.image.repository }}:{{ .Values.apiServer.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.apiServer.image.pullPolicy }} env: @@ -156,16 +156,16 @@ spec: periodSeconds: 5 timeoutSeconds: 2 resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} + {{- toYaml .Values.apiServer.resources | nindent 12 }} + {{- with .Values.apiServer.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.apiServer.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.apiServer.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/api-server/hpa.yaml b/kubeflow/helm/pipelines/templates/api-server/hpa.yaml new file mode 100644 index 000000000..4d8b678fc --- /dev/null +++ b/kubeflow/helm/pipelines/templates/api-server/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.apiServer.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-api-server + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-api-server + minReplicas: {{ .Values.apiServer.autoscaling.minReplicas }} + maxReplicas: {{ .Values.apiServer.autoscaling.maxReplicas }} + metrics: + {{- if .Values.apiServer.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.apiServer.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.apiServer.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.apiServer.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/argo-workflow-controller/deployment.yaml b/kubeflow/helm/pipelines/templates/argo-workflow-controller/deployment.yaml index 5877940c7..7c153aca1 100644 --- a/kubeflow/helm/pipelines/templates/argo-workflow-controller/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/argo-workflow-controller/deployment.yaml @@ -5,8 +5,8 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.argoWorkflowController.autoscaling.enabled }} + replicas: {{ .Values.argoWorkflowController.replicaCount }} {{- end }} selector: matchLabels: @@ -65,16 +65,16 @@ spec: resources: {{- toYaml .Values.argoWorkflowController.resources | nindent 12 }} priorityClassName: {{ include "pipelines.fullname" . }}-argo-workflow-controller - {{- with .Values.nodeSelector }} + {{- with .Values.argoWorkflowController.nodeSelector }} nodeSelector: kubernetes.io/os: linux {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.argoWorkflowController.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.argoWorkflowController.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/argo-workflow-controller/hpa.yaml b/kubeflow/helm/pipelines/templates/argo-workflow-controller/hpa.yaml new file mode 100644 index 000000000..4ebdfde6f --- /dev/null +++ b/kubeflow/helm/pipelines/templates/argo-workflow-controller/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.argoWorkflowController.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-argo-workflow-controller + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-argo-workflow-controller + minReplicas: {{ .Values.argoWorkflowController.autoscaling.minReplicas }} + maxReplicas: {{ .Values.argoWorkflowController.autoscaling.maxReplicas }} + metrics: + {{- if .Values.argoWorkflowController.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.argoWorkflowController.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.argoWorkflowController.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.argoWorkflowController.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/cache/server/deployment.yaml b/kubeflow/helm/pipelines/templates/cache/server/deployment.yaml index af4e17afa..9b733b0c9 100644 --- a/kubeflow/helm/pipelines/templates/cache/server/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/cache/server/deployment.yaml @@ -5,17 +5,16 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.cache.server.autoscaling.enabled }} + replicas: {{ .Values.cache.server.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.cacheServerSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.cache.server.podAnnotations }} annotations: - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -27,11 +26,11 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-cache-server securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.cache.server.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-cache-server securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.cache.server.securityContext | nindent 12 }} image: "{{ .Values.cache.server.image.repository }}:{{ .Values.cache.server.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.cache.server.image.pullPolicy }} args: @@ -105,7 +104,7 @@ spec: containerPort: 8443 protocol: TCP resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.cache.server.resources | nindent 12 }} volumeMounts: - mountPath: /etc/webhook/certs name: webhook-tls-certs @@ -114,15 +113,15 @@ spec: - secret: secretName: {{ include "pipelines.fullname" . }}-cache-server-tls name: webhook-tls-certs - {{- with .Values.nodeSelector }} + {{- with .Values.cache.server.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.cache.server.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.cache.server.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/cache/server/hpa.yaml b/kubeflow/helm/pipelines/templates/cache/server/hpa.yaml new file mode 100644 index 000000000..678cb773c --- /dev/null +++ b/kubeflow/helm/pipelines/templates/cache/server/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.cache.server.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-cache-server + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-cache-server + minReplicas: {{ .Values.cache.server.autoscaling.minReplicas }} + maxReplicas: {{ .Values.cache.server.autoscaling.maxReplicas }} + metrics: + {{- if .Values.cache.server.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.cache.server.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.cache.server.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.cache.server.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/metadata/envoy/deployment.yaml b/kubeflow/helm/pipelines/templates/metadata/envoy/deployment.yaml index d1bc0bd08..07a02b7eb 100644 --- a/kubeflow/helm/pipelines/templates/metadata/envoy/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/metadata/envoy/deployment.yaml @@ -5,17 +5,18 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.metadata.envoy.autoscaling.enabled }} + replicas: {{ .Values.metadata.envoy.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.metadataEnvoySelectorLabels" . | nindent 6 }} template: metadata: + {{- with .Values.metadata.envoy.podAnnotations }} annotations: - sidecar.istio.io/inject: "false" - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + {{- toYaml . | nindent 8 }} + {{- end }} labels: {{- include "pipelines.metadataEnvoySelectorLabels" . | nindent 8 }} spec: @@ -25,11 +26,11 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-metadata-envoy securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.metadata.envoy.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-metadata-envoy securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.metadata.envoy.securityContext | nindent 12 }} image: "{{ .Values.metadata.envoy.image.repository }}:{{ .Values.metadata.envoy.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.metadata.envoy.image.pullPolicy }} args: @@ -42,7 +43,7 @@ spec: containerPort: 9901 protocol: TCP resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.metadata.envoy.resources | nindent 12 }} volumeMounts: - mountPath: /config name: config-volume @@ -50,15 +51,15 @@ spec: - configMap: name: {{ include "pipelines.fullname" . }}-metadata-envoy-config name: config-volume - {{- with .Values.nodeSelector }} + {{- with .Values.metadata.envoy.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.metadata.envoy.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.metadata.envoy.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/metadata/envoy/hpa.yaml b/kubeflow/helm/pipelines/templates/metadata/envoy/hpa.yaml new file mode 100644 index 000000000..a0fa8233b --- /dev/null +++ b/kubeflow/helm/pipelines/templates/metadata/envoy/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.metadata.envoy.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-metadata-envoy + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-metadata-envoy + minReplicas: {{ .Values.metadata.envoy.autoscaling.minReplicas }} + maxReplicas: {{ .Values.metadata.envoy.autoscaling.maxReplicas }} + metrics: + {{- if .Values.metadata.envoy.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.metadata.envoy.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.metadata.envoy.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.metadata.envoy.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/metadata/grpc-server/deployment.yaml b/kubeflow/helm/pipelines/templates/metadata/grpc-server/deployment.yaml index 7594ecb6e..cb34a81e2 100644 --- a/kubeflow/helm/pipelines/templates/metadata/grpc-server/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/metadata/grpc-server/deployment.yaml @@ -5,17 +5,16 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.metadata.grpc.autoscaling.enabled }} + replicas: {{ .Values.metadata.grpc.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.metadataGRPCServerSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.metadata.grpc.podAnnotations }} annotations: - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -27,11 +26,11 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-metadata-grpc-server securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.metadata.grpc.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-metadata-grpc-server securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.metadata.grpc.securityContext | nindent 12 }} image: "{{ .Values.metadata.grpc.image.repository }}:{{ .Values.metadata.grpc.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.metadata.grpc.image.pullPolicy }} args: @@ -87,16 +86,16 @@ spec: port: api timeoutSeconds: 2 resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} + {{- toYaml .Values.metadata.grpc.resources | nindent 12 }} + {{- with .Values.metadata.grpc.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.metadata.grpc.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.metadata.grpc.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/metadata/grpc-server/hpa.yaml b/kubeflow/helm/pipelines/templates/metadata/grpc-server/hpa.yaml new file mode 100644 index 000000000..735c5f71a --- /dev/null +++ b/kubeflow/helm/pipelines/templates/metadata/grpc-server/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.metadata.grpc.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-metadata-grpc-server + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-metadata-grpc-server + minReplicas: {{ .Values.metadata.grpc.autoscaling.minReplicas }} + maxReplicas: {{ .Values.metadata.grpc.autoscaling.maxReplicas }} + metrics: + {{- if .Values.metadata.grpc.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.metadata.grpc.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.metadata.grpc.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.metadata.grpc.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/metadata/writer/deployment.yaml b/kubeflow/helm/pipelines/templates/metadata/writer/deployment.yaml index 2fae96466..f30cdc58f 100644 --- a/kubeflow/helm/pipelines/templates/metadata/writer/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/metadata/writer/deployment.yaml @@ -5,17 +5,16 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.metadata.writer.autoscaling.enabled }} + replicas: {{ .Values.metadata.writer.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.metadataWriterSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.metadata.writer.podAnnotations }} annotations: - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -27,11 +26,11 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-metadata-writer securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.metadata.writer.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-metadata-writer securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.metadata.writer.securityContext | nindent 12 }} image: "{{ .Values.metadata.writer.image.repository }}:{{ .Values.metadata.writer.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.metadata.writer.image.pullPolicy }} env: @@ -41,16 +40,16 @@ spec: - configMapRef: name: {{ include "pipelines.fullname" . }}-metadata-writer-parameters resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} + {{- toYaml .Values.metadata.writer.resources | nindent 12 }} + {{- with .Values.metadata.writer.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.metadata.writer.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.metadata.writer.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/metadata/writer/hpa.yaml b/kubeflow/helm/pipelines/templates/metadata/writer/hpa.yaml new file mode 100644 index 000000000..4ad020ef2 --- /dev/null +++ b/kubeflow/helm/pipelines/templates/metadata/writer/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.metadata.writer.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-metadata-writer + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-metadata-writer + minReplicas: {{ .Values.metadata.writer.autoscaling.minReplicas }} + maxReplicas: {{ .Values.metadata.writer.autoscaling.maxReplicas }} + metrics: + {{- if .Values.metadata.writer.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.metadata.writer.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.metadata.writer.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.metadata.writer.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/persistence-agent/deployment.yaml b/kubeflow/helm/pipelines/templates/persistence-agent/deployment.yaml index 76683bf1d..5f7573175 100644 --- a/kubeflow/helm/pipelines/templates/persistence-agent/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/persistence-agent/deployment.yaml @@ -5,17 +5,16 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.persistenceAgent.autoscaling.enabled }} + replicas: {{ .Values.persistenceAgent.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.persistenceAgentSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.persistenceAgent.podAnnotations }} annotations: - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -27,11 +26,11 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-persistence-agent securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.persistenceAgent.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-persistence-agent securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.persistenceAgent.securityContext | nindent 12 }} image: "{{ .Values.persistenceAgent.image.repository }}:{{ .Values.persistenceAgent.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.persistenceAgent.image.pullPolicy }} args: @@ -54,7 +53,7 @@ spec: - configMapRef: name: {{ include "pipelines.fullname" . }}-persistence-agent-parameters resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.persistenceAgent.resources | nindent 12 }} volumeMounts: - mountPath: /var/run/secrets/kubeflow/tokens name: persistenceagent-sa-token @@ -66,15 +65,15 @@ spec: audience: pipelines.kubeflow.org expirationSeconds: 3600 path: persistenceagent-sa-token - {{- with .Values.nodeSelector }} + {{- with .Values.persistenceAgent.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.persistenceAgent.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.persistenceAgent.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/persistence-agent/hpa.yaml b/kubeflow/helm/pipelines/templates/persistence-agent/hpa.yaml new file mode 100644 index 000000000..337b0a1e5 --- /dev/null +++ b/kubeflow/helm/pipelines/templates/persistence-agent/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.persistenceAgent.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-persistence-agent + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-persistence-agent + minReplicas: {{ .Values.persistenceAgent.autoscaling.minReplicas }} + maxReplicas: {{ .Values.persistenceAgent.autoscaling.maxReplicas }} + metrics: + {{- if .Values.persistenceAgent.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.persistenceAgent.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.persistenceAgent.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.persistenceAgent.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/scheduled-workflow/deployment.yaml b/kubeflow/helm/pipelines/templates/scheduled-workflow/deployment.yaml index 34e488834..84b8c63a2 100644 --- a/kubeflow/helm/pipelines/templates/scheduled-workflow/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/scheduled-workflow/deployment.yaml @@ -5,17 +5,16 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.scheduledWorkflow.autoscaling.enabled }} + replicas: {{ .Values.scheduledWorkflow.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.scheduledWorkflowSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.scheduledWorkflow.podAnnotations }} annotations: - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -27,11 +26,11 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-scheduled-workflow securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.scheduledWorkflow.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-scheduled-workflow securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.scheduledWorkflow.securityContext | nindent 12 }} image: "{{ .Values.scheduledWorkflow.image.repository }}:{{ .Values.scheduledWorkflow.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.scheduledWorkflow.image.pullPolicy }} env: @@ -43,16 +42,16 @@ spec: key: cronScheduleTimezone name: pipeline-install-config resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} + {{- toYaml .Values.scheduledWorkflow.resources | nindent 12 }} + {{- with .Values.scheduledWorkflow.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.scheduledWorkflow.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.scheduledWorkflow.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/scheduled-workflow/hpa.yaml b/kubeflow/helm/pipelines/templates/scheduled-workflow/hpa.yaml new file mode 100644 index 000000000..dcb96778e --- /dev/null +++ b/kubeflow/helm/pipelines/templates/scheduled-workflow/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.scheduledWorkflow.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-scheduled-workflow + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-scheduled-workflow + minReplicas: {{ .Values.scheduledWorkflow.autoscaling.minReplicas }} + maxReplicas: {{ .Values.scheduledWorkflow.autoscaling.maxReplicas }} + metrics: + {{- if .Values.scheduledWorkflow.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.scheduledWorkflow.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.scheduledWorkflow.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.scheduledWorkflow.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/viewer-controller/deployment.yaml b/kubeflow/helm/pipelines/templates/viewer-controller/deployment.yaml index 84049d8b6..c08508cb9 100644 --- a/kubeflow/helm/pipelines/templates/viewer-controller/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/viewer-controller/deployment.yaml @@ -5,17 +5,16 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.viewerController.autoscaling.enabled }} + replicas: {{ .Values.viewerController.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.viewerControllerSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.viewerController.podAnnotations }} annotations: - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -27,11 +26,11 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-viewer-controller securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.viewerController.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-viewer-controller securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.viewerController.securityContext | nindent 12 }} image: "{{ .Values.viewerController.image.repository }}:{{ .Values.viewerController.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.viewerController.image.pullPolicy }} env: @@ -40,16 +39,16 @@ spec: - name: MAX_NUM_VIEWERS value: "50" resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} + {{- toYaml .Values.viewerController.resources | nindent 12 }} + {{- with .Values.viewerController.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.viewerController.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.viewerController.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/viewer-controller/hpa.yaml b/kubeflow/helm/pipelines/templates/viewer-controller/hpa.yaml new file mode 100644 index 000000000..6b9ee358a --- /dev/null +++ b/kubeflow/helm/pipelines/templates/viewer-controller/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.viewerController.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-viewer-controller + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-viewer-controller + minReplicas: {{ .Values.viewerController.autoscaling.minReplicas }} + maxReplicas: {{ .Values.viewerController.autoscaling.maxReplicas }} + metrics: + {{- if .Values.viewerController.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.viewerController.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.viewerController.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.viewerController.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/visualization-server/deployment.yaml b/kubeflow/helm/pipelines/templates/visualization-server/deployment.yaml index 0e095c2fd..23e76edfa 100644 --- a/kubeflow/helm/pipelines/templates/visualization-server/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/visualization-server/deployment.yaml @@ -5,17 +5,16 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.visualizationServer.autoscaling.enabled }} + replicas: {{ .Values.visualizationServer.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.visualizationServerSelectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.visualizationServer.podAnnotations }} annotations: - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -27,11 +26,11 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-visualization-server securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.visualizationServer.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-visualization-server securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} + {{- toYaml .Values.visualizationServer.securityContext | nindent 12 }} image: "{{ .Values.visualizationServer.image.repository }}:{{ .Values.visualizationServer.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.visualizationServer.image.pullPolicy }} ports: @@ -63,16 +62,16 @@ spec: periodSeconds: 5 timeoutSeconds: 2 resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} + {{- toYaml .Values.visualizationServer.resources | nindent 12 }} + {{- with .Values.visualizationServer.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.visualizationServer.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.visualizationServer.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/visualization-server/hpa.yaml b/kubeflow/helm/pipelines/templates/visualization-server/hpa.yaml new file mode 100644 index 000000000..ef262b998 --- /dev/null +++ b/kubeflow/helm/pipelines/templates/visualization-server/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.visualizationServer.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "pipelines.fullname" . }}-visualization-server + labels: + {{- include "pipelines.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "pipelines.fullname" . }}-visualization-server + minReplicas: {{ .Values.visualizationServer.autoscaling.minReplicas }} + maxReplicas: {{ .Values.visualizationServer.autoscaling.maxReplicas }} + metrics: + {{- if .Values.visualizationServer.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.visualizationServer.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.visualizationServer.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.visualizationServer.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/kubeflow/helm/pipelines/templates/web-app/deployment.yaml b/kubeflow/helm/pipelines/templates/web-app/deployment.yaml index ee77889e9..009a060a8 100644 --- a/kubeflow/helm/pipelines/templates/web-app/deployment.yaml +++ b/kubeflow/helm/pipelines/templates/web-app/deployment.yaml @@ -5,17 +5,16 @@ metadata: labels: {{- include "pipelines.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + {{- if not .Values.webapp.autoscaling.enabled }} + replicas: {{ .Values.webapp.replicaCount }} {{- end }} selector: matchLabels: {{- include "pipelines.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- with .Values.webapp.podAnnotations }} annotations: - cluster-autoscaler.kubernetes.io/safe-to-evict: "true" {{- toYaml . | nindent 8 }} {{- end }} labels: @@ -27,13 +26,13 @@ spec: {{- end }} serviceAccountName: {{ include "pipelines.serviceAccountName" . }}-web-app securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.webapp.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-web-app securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- toYaml .Values.webapp.securityContext | nindent 12 }} + image: "{{ .Values.webapp.image.repository }}:{{ .Values.webapp.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.webapp.image.pullPolicy }} env: - name: AWS_ACCESS_KEY_ID valueFrom: @@ -74,7 +73,7 @@ spec: periodSeconds: 5 timeoutSeconds: 2 resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml .Values.webapp.resources | nindent 12 }} envFrom: - configMapRef: name: {{ include "pipelines.fullname" . }}-web-app-parameters @@ -86,15 +85,15 @@ spec: - configMap: name: {{ include "pipelines.fullname" . }}-web-app-viewer-template name: config-volume - {{- with .Values.nodeSelector }} + {{- with .Values.webapp.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.webapp.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.webapp.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/web-app/hpa.yaml b/kubeflow/helm/pipelines/templates/web-app/hpa.yaml index a7171f655..4b3868cd1 100644 --- a/kubeflow/helm/pipelines/templates/web-app/hpa.yaml +++ b/kubeflow/helm/pipelines/templates/web-app/hpa.yaml @@ -1,32 +1,32 @@ -{{- if .Values.autoscaling.enabled }} +{{- if .Values.webapp.autoscaling.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: - name: {{ include "pipelines.fullname" . }} + name: {{ include "pipelines.fullname" . }}-web-app labels: {{- include "pipelines.labels" . | nindent 4 }} spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment - name: {{ include "pipelines.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} + name: {{ include "pipelines.fullname" . }}-web-app + minReplicas: {{ .Values.webapp.autoscaling.minReplicas }} + maxReplicas: {{ .Values.webapp.autoscaling.maxReplicas }} metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- if .Values.webapp.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: name: cpu target: type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + averageUtilization: {{ .Values.webapp.autoscaling.targetCPUUtilizationPercentage }} {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- if .Values.webapp.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory target: type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + averageUtilization: {{ .Values.webapp.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/kubeflow/helm/pipelines/templates/web-app/service.yaml b/kubeflow/helm/pipelines/templates/web-app/service.yaml index d17b44395..062b31893 100644 --- a/kubeflow/helm/pipelines/templates/web-app/service.yaml +++ b/kubeflow/helm/pipelines/templates/web-app/service.yaml @@ -7,7 +7,7 @@ metadata: spec: type: ClusterIP ports: - - port: {{ .Values.service.port }} + - port: {{ .Values.webapp.service.port }} targetPort: website protocol: TCP name: http-website diff --git a/kubeflow/helm/pipelines/templates/web-app/virtualservice.yaml b/kubeflow/helm/pipelines/templates/web-app/virtualservice.yaml index bdebd25f2..34626a1f4 100644 --- a/kubeflow/helm/pipelines/templates/web-app/virtualservice.yaml +++ b/kubeflow/helm/pipelines/templates/web-app/virtualservice.yaml @@ -3,33 +3,33 @@ kind: VirtualService metadata: name: {{ include "pipelines.fullname" . }}-web-app labels: {{- include "pipelines.labels" . | nindent 4 }} - {{- with .Values.virtualService.annotations }} + {{- with .Values.webapp.virtualService.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: gateways: - {{- range .Values.virtualService.gateways }} + {{- range .Values.webapp.virtualService.gateways }} - {{ . | quote }} {{- end }} hosts: - {{ .Values.global.domain }} - {{- range .Values.virtualService.hosts }} + {{- range .Values.webapp.virtualService.hosts }} - {{ . | quote }} {{- end }} http: - headers: request: add: - x-forwarded-prefix: {{ .Values.virtualService.prefix }} + x-forwarded-prefix: {{ .Values.webapp.virtualService.prefix }} match: - uri: - prefix: {{ .Values.virtualService.prefix }} + prefix: {{ .Values.webapp.virtualService.prefix }} rewrite: - uri: {{ .Values.virtualService.prefix }} + uri: {{ .Values.webapp.virtualService.prefix }} route: - destination: host: {{ include "pipelines.fullname" . }}-web-app.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }} port: - number: {{ .Values.service.port }} + number: {{ .Values.webapp.service.port }} timeout: 300s diff --git a/kubeflow/helm/pipelines/values.yaml b/kubeflow/helm/pipelines/values.yaml index 17f0d6d15..58652177d 100644 --- a/kubeflow/helm/pipelines/values.yaml +++ b/kubeflow/helm/pipelines/values.yaml @@ -14,7 +14,9 @@ global: authEndpoint: "" tokenEndpoint: "" -replicaCount: 1 +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" config: databases: @@ -31,16 +33,6 @@ config: bucketName: pipelines-bucket bucketRegion: us-east-2 -image: - repository: gcr.io/ml-pipeline/frontend - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: 2.0.1 - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - serviceAccount: # Specifies whether a service account should be created create: true @@ -50,32 +42,70 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" -podAnnotations: - sidecar.istio.io/inject: "true" +webapp: + replicaCount: 1 -podSecurityContext: {} - # fsGroup: 2000 + image: + repository: gcr.io/ml-pipeline/frontend + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: 2.0.1 -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + sidecar.istio.io/inject: "true" -service: - port: 80 + podSecurityContext: {} + # fsGroup: 2000 -virtualService: - annotations: {} - prefix: /pipeline - gateways: - - kubeflow-gateway - # hosts to add additional to the value of global.domain - hosts: [] + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + service: + port: 80 + + virtualService: + annotations: {} + prefix: /pipeline + gateways: + - kubeflow-gateway + # hosts to add additional to the value of global.domain + hosts: [] + + resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} apiServer: + + replicaCount: 1 + image: repository: gcr.io/ml-pipeline/api-server pullPolicy: IfNotPresent @@ -87,28 +117,145 @@ apiServer: grpc: port: 8887 + resources: {} + + podAnnotations: + sidecar.istio.io/inject: "true" + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} + persistenceAgent: + replicaCount: 1 image: repository: gcr.io/ml-pipeline/persistenceagent pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: 2.0.1 + resources: {} + + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} scheduledWorkflow: + replicaCount: 1 image: repository: gcr.io/ml-pipeline/scheduledworkflow pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: 2.0.1 + resources: {} + + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} viewerController: + replicaCount: 1 image: repository: gcr.io/ml-pipeline/viewer-crd-controller pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: 2.0.1 + resources: {} + + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} visualizationServer: + replicaCount: 1 image: repository: gcr.io/ml-pipeline/visualization-server pullPolicy: IfNotPresent @@ -116,8 +263,37 @@ visualizationServer: tag: 2.0.1 service: port: 8888 + resources: {} + + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} argoWorkflowController: + replicaCount: 1 image: repository: gcr.io/ml-pipeline/workflow-controller pullPolicy: IfNotPresent @@ -149,11 +325,21 @@ argoWorkflowController: prometheus.io/scrape: "true" prometheus.io/path: /metrics podSecurityContext: {} + nodeSelector: {} + tolerations: [] + affinity: {} service: port: 9090 + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 cache: server: + replicaCount: 1 image: repository: gcr.io/ml-pipeline/cache-server pullPolicy: IfNotPresent @@ -161,6 +347,37 @@ cache: tag: 2.0.1 service: port: 443 + resources: {} + + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + sidecar.istio.io/inject: "true" + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + nodeSelector: {} + + tolerations: [] + + affinity: {} + + deployer: image: repository: gcr.io/ml-pipeline/cache-deployer @@ -170,6 +387,7 @@ cache: metadata: envoy: + replicaCount: 1 image: repository: gcr.io/ml-pipeline/metadata-envoy pullPolicy: IfNotPresent @@ -179,7 +397,31 @@ metadata: port: 9090 admin: port: 9901 + resources: {} + podAnnotations: + sidecar.istio.io/inject: "false" + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + podSecurityContext: {} + # fsGroup: 2000 + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + nodeSelector: {} + tolerations: [] + affinity: {} + grpc: + replicaCount: 1 image: repository: gcr.io/tfx-oss-public/ml_metadata_store_server pullPolicy: IfNotPresent @@ -194,34 +436,52 @@ metadata: - kubeflow-gateway # hosts to add additional to the value of global.domain hosts: [] + resources: {} + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + podSecurityContext: {} + # fsGroup: 2000 + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + nodeSelector: {} + tolerations: [] + affinity: {} writer: + replicaCount: 1 image: repository: gcr.io/ml-pipeline/metadata-writer pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: 2.0.1 - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} + resources: {} + podAnnotations: + cluster-autoscaler.kubernetes.io/safe-to-evict: "true" + podSecurityContext: {} + # fsGroup: 2000 + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + nodeSelector: {} + tolerations: [] + affinity: {}