Skip to content

Commit

Permalink
added nodeSelector & affinity & tolerations
Browse files Browse the repository at this point in the history
Signed-off-by: medicharlachiranjeevi <medicharlachiranjeevi@gmail.com>
  • Loading branch information
medicharlachiranjeevi committed May 18, 2023
1 parent ff3ff9e commit 02c1e62
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
13 changes: 13 additions & 0 deletions installer/helm/chart/volcano/templates/admission.yaml
Expand Up @@ -114,6 +114,19 @@ spec:
configMap:
name: {{ .Release.Name }}-admission-configmap

{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

---
apiVersion: v1
kind: Service
Expand Down
12 changes: 12 additions & 0 deletions installer/helm/chart/volcano/templates/controllers.yaml
Expand Up @@ -109,4 +109,16 @@ spec:
- -v=4
- 2>&1
imagePullPolicy: {{ .Values.basic.image_pull_policy }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
12 changes: 12 additions & 0 deletions installer/helm/chart/volcano/templates/scheduler.yaml
Expand Up @@ -135,6 +135,18 @@ spec:
- name: scheduler-config
configMap:
name: {{ .Release.Name }}-scheduler-configmap
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
---
apiVersion: v1
kind: Service
Expand Down
3 changes: 3 additions & 0 deletions installer/helm/chart/volcano/values.yaml
Expand Up @@ -18,3 +18,6 @@ custom:
scheduler_enable: true
scheduler_replicas: 1
enabled_admissions: "/jobs/mutate,/jobs/validate,/podgroups/mutate,/pods/validate,/pods/mutate,/queues/mutate,/queues/validate"
nodeSelector: {}
affinity: []
tolerations: []

0 comments on commit 02c1e62

Please sign in to comment.