{{- if .Values.deschedulerPolicy }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "descheduler.fullname" . }}
  namespace: {{ include "descheduler.namespace" . }}
  labels:
    {{- include "descheduler.labels" . | nindent 4 }}
data:
  policy.yaml: |
    apiVersion: "{{ .Values.deschedulerPolicyAPIVersion }}"
    kind: "DeschedulerPolicy"
{{ toYaml .Values.deschedulerPolicy | trim | indent 4 }}
{{- end }}
