Skip to content

Commit

Permalink
Add node selectors and tolerations (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliyahu77 authored Jan 13, 2023
1 parent ebd0c84 commit a77b2d4
Show file tree
Hide file tree
Showing 14 changed files with 86 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/mlrun-ce/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions charts/mlrun-ce/templates/jupyter-notebook/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
6 changes: 6 additions & 0 deletions charts/mlrun-ce/templates/pipelines/deployments/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
13 changes: 13 additions & 0 deletions charts/mlrun-ce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a77b2d4

Please sign in to comment.