Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#660 from martin-magakian/features/…
Browse files Browse the repository at this point in the history
…add_affinity_option

Adding 'affinity' support to run 'descheduler' in CronJob or Deployment
  • Loading branch information
(Brien Dieterle) committed Jan 27, 2022
2 parents a21a53b + 705dd02 commit 1ac305e
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
11 changes: 11 additions & 0 deletions charts/descheduler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1ac305e

Please sign in to comment.