Skip to content

Commit 3a5c651

Browse files
Move values.yaml comment about defining your own configmap to a NOTES.txt output instead (kubernetes-sigs#1582)
* Move values.yaml comment about defining your own configmap to a NOTES.txt output instead Signed-off-by: Thomas D. Spear <[email protected]> * Stop a blank line from being rendered when leader election is not enabled Signed-off-by: Thomas D. Spear <[email protected]> * Remove 'default' from the language of the new note Signed-off-by: Thomas D. Spear <[email protected]> --------- Signed-off-by: Thomas D. Spear <[email protected]>
1 parent 68207da commit 3a5c651

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

charts/descheduler/templates/NOTES.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,13 @@ WARNING: You enabled DryRun mode, you can't use Leader Election.
1010
{{- end}}
1111
{{- end}}
1212
{{- end}}
13+
{{- if .Values.deschedulerPolicy }}
14+
A DeschedulerPolicy has been applied for you. You can view the policy with:
15+
16+
kubectl get configmap -n {{ include "descheduler.namespace" . }} {{ template "descheduler.fullname" . }} -o yaml
17+
18+
If you wish to define your own policies out of band from this chart, you may define a configmap named {{ template "descheduler.fullname" . }}.
19+
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.
20+
21+
deschedulerPolicy: {}
22+
{{- end }}

charts/descheduler/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ spec:
5959
- {{ printf "--%s" $key }}
6060
{{- end }}
6161
{{- end }}
62+
{{- if .Values.leaderElection.enabled }}
6263
{{- include "descheduler.leaderElection" . | nindent 12 }}
64+
{{- end }}
6365
ports:
6466
{{- toYaml .Values.ports | nindent 12 }}
6567
livenessProbe:

charts/descheduler/values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ cmdOptions:
8989
deschedulerPolicyAPIVersion: "descheduler/v1alpha2"
9090

9191
# deschedulerPolicy contains the policies the descheduler will execute.
92-
# To use policies stored in an existing configMap use:
93-
# NOTE: The name of the cm should comply to {{ template "descheduler.fullname" . }}
94-
# deschedulerPolicy: {}
9592
deschedulerPolicy:
9693
# nodeSelector: "key1=value1,key2=value2"
9794
# maxNoOfPodsToEvictPerNode: 10

0 commit comments

Comments
 (0)