apiVersion: v1
kind: ConfigMap
metadata:
  name: descheduler
  namespace: descheduler
  labels:
    app.kubernetes.io/name: descheduler
    helm.sh/chart: descheduler-0.34.0
    app.kubernetes.io/instance: descheduler
    app.kubernetes.io/version: "0.34.0"
    app.kubernetes.io/managed-by: Helm
data:
  policy.yaml: |
    apiVersion: "descheduler/v1alpha2"
    kind: "DeschedulerPolicy"
    profiles:
    - name: default
      pluginConfig:
      - args:
          evictDaemonSetPods: false
          evictLocalStoragePods: false
          ignorePvcPods: true
        name: DefaultEvictor
      - name: RemoveDuplicates
      - args:
          nodeAffinityType:
          - requiredDuringSchedulingIgnoredDuringExecution
        name: RemovePodsViolatingNodeAffinity
      - name: RemovePodsViolatingNodeTaints
      - name: RemovePodsViolatingInterPodAntiAffinity
      - name: RemovePodsViolatingTopologySpreadConstraint
      - args:
          evictableNamespaces:
            exclude:
            - kube-system
          evictionModes:
          - OnlyThresholdingResources
          thresholds:
            cpu: 80
            memory: 80
            pods: 90
        name: HighNodeUtilization
      - args:
          targetThresholds:
            cpu: 60
            memory: 40
            pods: 80
          thresholds:
            cpu: 30
            memory: 30
            pods: 50
        name: LowNodeUtilization
      plugins:
        balance:
          enabled:
          - RemoveDuplicates
          - RemovePodsViolatingTopologySpreadConstraint
          - LowNodeUtilization
        deschedule:
          enabled:
          - RemovePodsViolatingNodeTaints
          - RemovePodsViolatingNodeAffinity
          - RemovePodsViolatingInterPodAntiAffinity
