diff --git a/charts/descheduler/templates/cronjob.yaml b/charts/descheduler/templates/cronjob.yaml index e7751434d..5624eb0b0 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 c0b60c2c4..a464dfbed 100644 --- a/charts/descheduler/templates/deployment.yaml +++ b/charts/descheduler/templates/deployment.yaml @@ -68,6 +68,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 b6b2a9bc2..5777a5a43 100644 --- a/charts/descheduler/values.yaml +++ b/charts/descheduler/values.yaml @@ -71,6 +71,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'