Skip to content

Commit

Permalink
helm: Allow the use of existing policy configMap (#1376)
Browse files Browse the repository at this point in the history
* Allow the use of existing policy configMap.

* Update charts/descheduler/templates/configmap.yaml

Co-authored-by: Amir Alavi <amiralavi7@gmail.com>

* Remove references to unused variable and update documentation regarding deschedulerPolicy

* Add missing newLine at EOF

* Update charts/descheduler/values.yaml

* remove trailing space

---------

Co-authored-by: Amir Alavi <amiralavi7@gmail.com>
  • Loading branch information
agmimidi and a7i authored Apr 17, 2024
1 parent 4bd348d commit 2c06a33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/descheduler/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.deschedulerPolicy }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -10,3 +11,4 @@ data:
apiVersion: "{{ .Values.deschedulerPolicyAPIVersion }}"
kind: "DeschedulerPolicy"
{{ toYaml .Values.deschedulerPolicy | trim | indent 4 }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/descheduler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ cmdOptions:
# Recommended to use the latest Policy API version supported by the Descheduler app version
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
Expand Down

0 comments on commit 2c06a33

Please sign in to comment.