Skip to content

Commit

Permalink
Adding 'affinity' support to run 'descheduler' in CronJob or Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-magakian committed Nov 18, 2021
1 parent d0f11a4 commit ad20777
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/descheduler/templates/cronjob.yaml
Expand Up @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/descheduler/templates/deployment.yaml
Expand Up @@ -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 }}
Expand Down
11 changes: 11 additions & 0 deletions charts/descheduler/values.yaml
Expand Up @@ -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'
Expand Down

0 comments on commit ad20777

Please sign in to comment.