diff --git a/charts/descheduler/templates/cronjob.yaml b/charts/descheduler/templates/cronjob.yaml index 3f3d31d1c..82db9af6a 100644 --- a/charts/descheduler/templates/cronjob.yaml +++ b/charts/descheduler/templates/cronjob.yaml @@ -40,6 +40,10 @@ spec: nodeSelector: {{- toYaml . | nindent 12 }} {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 12 }} + {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 12 }} diff --git a/charts/descheduler/templates/deployment.yaml b/charts/descheduler/templates/deployment.yaml index 97d149e8e..c7010d29d 100644 --- a/charts/descheduler/templates/deployment.yaml +++ b/charts/descheduler/templates/deployment.yaml @@ -70,6 +70,10 @@ spec: nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} diff --git a/charts/descheduler/values.yaml b/charts/descheduler/values.yaml index e896fe02b..326aa05cf 100644 --- a/charts/descheduler/values.yaml +++ b/charts/descheduler/values.yaml @@ -74,6 +74,17 @@ priorityClassName: system-cluster-critical nodeSelector: {} # foo: bar +affinity: {} +# nodeAffinity: +# requiredDuringSchedulingIgnoredDuringExecution: +# nodeSelectorTerms: +# - matchExpressions: +# - key: kubernetes.io/e2e-az-name +# operator: In +# values: +# - e2e-az1 +# - e2e-az2 + tolerations: [] # - key: 'management' # operator: 'Equal'