diff --git a/charts/descheduler/templates/NOTES.txt b/charts/descheduler/templates/NOTES.txt index 588298048..edf20d01f 100644 --- a/charts/descheduler/templates/NOTES.txt +++ b/charts/descheduler/templates/NOTES.txt @@ -10,3 +10,13 @@ WARNING: You enabled DryRun mode, you can't use Leader Election. {{- end}} {{- end}} {{- end}} +{{- if .Values.deschedulerPolicy }} +A DeschedulerPolicy has been applied for you. You can view the policy with: + +kubectl get configmap -n {{ include "descheduler.namespace" . }} {{ template "descheduler.fullname" . }} -o yaml + +If you wish to define your own policies out of band from this chart, you may define a configmap named {{ template "descheduler.fullname" . }}. +To avoid a conflict between helm and your out of band method to deploy the configmap, please set deschedulerPolicy in values.yaml to an empty object as below. + +deschedulerPolicy: {} +{{- end }} diff --git a/charts/descheduler/templates/deployment.yaml b/charts/descheduler/templates/deployment.yaml index 97fc6331d..41953866e 100644 --- a/charts/descheduler/templates/deployment.yaml +++ b/charts/descheduler/templates/deployment.yaml @@ -59,7 +59,9 @@ spec: - {{ printf "--%s" $key }} {{- end }} {{- end }} + {{- if .Values.leaderElection.enabled }} {{- include "descheduler.leaderElection" . | nindent 12 }} + {{- end }} ports: {{- toYaml .Values.ports | nindent 12 }} livenessProbe: diff --git a/charts/descheduler/values.yaml b/charts/descheduler/values.yaml index 3398da2fc..680ab3a37 100644 --- a/charts/descheduler/values.yaml +++ b/charts/descheduler/values.yaml @@ -89,9 +89,6 @@ cmdOptions: deschedulerPolicyAPIVersion: "descheduler/v1alpha2" # deschedulerPolicy contains the policies the descheduler will execute. -# To use policies stored in an existing configMap use: -# NOTE: The name of the cm should comply to {{ template "descheduler.fullname" . }} -# deschedulerPolicy: {} deschedulerPolicy: # nodeSelector: "key1=value1,key2=value2" # maxNoOfPodsToEvictPerNode: 10