From a77b2d4e5638a7a2d2572566e61c29d6fef3a6ca Mon Sep 17 00:00:00 2001 From: eliyahu77 <40737397+eliyahu77@users.noreply.github.com> Date: Fri, 13 Jan 2023 23:17:50 +0200 Subject: [PATCH] Add node selectors and tolerations (#52) --- charts/mlrun-ce/Chart.yaml | 2 +- .../templates/jupyter-notebook/deployment.yaml | 6 ++++++ .../deployments/metadata-envoy-deployment.yaml | 6 ++++++ .../deployments/metadata-grpc-deployment.yaml | 6 ++++++ .../pipelines/deployments/metadata-writer.yaml | 6 ++++++ .../deployments/ml-pipeline-persistenceagent.yaml | 6 ++++++ .../deployments/ml-pipeline-scheduledworkflow.yaml | 6 ++++++ .../pipelines/deployments/ml-pipeline-ui.yaml | 6 ++++++ .../deployments/ml-pipeline-viewer-crd.yaml | 6 ++++++ .../ml-pipeline-visualizationserver.yaml | 6 ++++++ .../pipelines/deployments/ml-pipeline.yaml | 6 ++++++ .../templates/pipelines/deployments/mysql.yaml | 6 ++++++ .../pipelines/deployments/workflow-controller.yaml | 6 ++++++ charts/mlrun-ce/values.yaml | 13 +++++++++++++ 14 files changed, 86 insertions(+), 1 deletion(-) diff --git a/charts/mlrun-ce/Chart.yaml b/charts/mlrun-ce/Chart.yaml index f1011165..d33e84f8 100644 --- a/charts/mlrun-ce/Chart.yaml +++ b/charts/mlrun-ce/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -version: 0.5.2-rc1 +version: 0.5.2-rc2 name: mlrun-ce description: MLRUn Open Source Stack home: https://iguazio.com diff --git a/charts/mlrun-ce/templates/jupyter-notebook/deployment.yaml b/charts/mlrun-ce/templates/jupyter-notebook/deployment.yaml index fe1e7b64..05ddd75d 100644 --- a/charts/mlrun-ce/templates/jupyter-notebook/deployment.yaml +++ b/charts/mlrun-ce/templates/jupyter-notebook/deployment.yaml @@ -74,6 +74,12 @@ spec: - --NotebookApp.token='' - --NotebookApp.password='' - --NotebookApp.default_url="/lab" + {{- with .Values.jupyterNotebook.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.jupyterNotebook.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} volumes: - name: notebooks persistentVolumeClaim: diff --git a/charts/mlrun-ce/templates/pipelines/deployments/metadata-envoy-deployment.yaml b/charts/mlrun-ce/templates/pipelines/deployments/metadata-envoy-deployment.yaml index 638a6c53..a88c9b48 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/metadata-envoy-deployment.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/metadata-envoy-deployment.yaml @@ -50,4 +50,10 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/metadata-grpc-deployment.yaml b/charts/mlrun-ce/templates/pipelines/deployments/metadata-grpc-deployment.yaml index 2bb2b5f6..ccfb95a9 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/metadata-grpc-deployment.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/metadata-grpc-deployment.yaml @@ -99,4 +99,10 @@ spec: serviceAccount: metadata-grpc-server serviceAccountName: metadata-grpc-server terminationGracePeriodSeconds: 30 + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/metadata-writer.yaml b/charts/mlrun-ce/templates/pipelines/deployments/metadata-writer.yaml index dbadb69e..610951b2 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/metadata-writer.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/metadata-writer.yaml @@ -49,4 +49,10 @@ spec: serviceAccount: kubeflow-pipelines-metadata-writer serviceAccountName: kubeflow-pipelines-metadata-writer terminationGracePeriodSeconds: 30 + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-persistenceagent.yaml b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-persistenceagent.yaml index 8ac315ec..efc4d1ed 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-persistenceagent.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-persistenceagent.yaml @@ -58,4 +58,10 @@ spec: serviceAccount: ml-pipeline-persistenceagent serviceAccountName: ml-pipeline-persistenceagent terminationGracePeriodSeconds: 30 + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-scheduledworkflow.yaml b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-scheduledworkflow.yaml index 6fc02556..525362be 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-scheduledworkflow.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-scheduledworkflow.yaml @@ -56,4 +56,10 @@ spec: serviceAccount: ml-pipeline-scheduledworkflow serviceAccountName: ml-pipeline-scheduledworkflow terminationGracePeriodSeconds: 30 + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-ui.yaml b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-ui.yaml index ff8a0801..bce082f5 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-ui.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-ui.yaml @@ -112,4 +112,10 @@ spec: defaultMode: 420 name: ml-pipeline-ui-configmap name: config-volume + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-viewer-crd.yaml b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-viewer-crd.yaml index 8474633b..ca7a6b70 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-viewer-crd.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-viewer-crd.yaml @@ -52,4 +52,10 @@ spec: serviceAccount: ml-pipeline-viewer-crd-service-account serviceAccountName: ml-pipeline-viewer-crd-service-account terminationGracePeriodSeconds: 30 + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-visualizationserver.yaml b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-visualizationserver.yaml index ae242106..954a7edd 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-visualizationserver.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline-visualizationserver.yaml @@ -80,4 +80,10 @@ spec: serviceAccount: ml-pipeline-visualizationserver serviceAccountName: ml-pipeline-visualizationserver terminationGracePeriodSeconds: 30 + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline.yaml b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline.yaml index 23baacf5..ac71ed38 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/ml-pipeline.yaml @@ -148,4 +148,10 @@ spec: serviceAccount: ml-pipeline serviceAccountName: ml-pipeline terminationGracePeriodSeconds: 30 + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/mysql.yaml b/charts/mlrun-ce/templates/pipelines/deployments/mysql.yaml index dbea5d81..0c0de72f 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/mysql.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/mysql.yaml @@ -61,4 +61,10 @@ spec: - name: mysql-persistent-storage persistentVolumeClaim: claimName: mysql-pv-claim + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/templates/pipelines/deployments/workflow-controller.yaml b/charts/mlrun-ce/templates/pipelines/deployments/workflow-controller.yaml index d5b24fc2..61c8498b 100644 --- a/charts/mlrun-ce/templates/pipelines/deployments/workflow-controller.yaml +++ b/charts/mlrun-ce/templates/pipelines/deployments/workflow-controller.yaml @@ -86,4 +86,10 @@ spec: serviceAccount: argo serviceAccountName: argo terminationGracePeriodSeconds: 30 + {{- with .Values.pipelines.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.pipelines.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} {{- end -}} diff --git a/charts/mlrun-ce/values.yaml b/charts/mlrun-ce/values.yaml index 36445f7f..da5efc13 100644 --- a/charts/mlrun-ce/values.yaml +++ b/charts/mlrun-ce/values.yaml @@ -201,6 +201,13 @@ jupyterNotebook: annotations: helm.sh/resource-policy: "keep" + nodeSelector: {} + # node-role.kubernetes.io/node: "true" + # tier: cs + tolerations: [] + # - key: "node-role.kubernetes.io/master" + # effect: NoSchedule + mpi-operator: fullnameOverride: mpi-operator crd: @@ -259,6 +266,12 @@ pipelines: size: "20Gi" annotations: helm.sh/resource-policy: "keep" + nodeSelector: {} + # node-role.kubernetes.io/node: "true" + # tier: cs + tolerations: [] + # - key: "node-role.kubernetes.io/master" + # effect: NoSchedule db: username: root minio: