From e30e218e3946122961b8f2d0ccbf7daf8f9622a3 Mon Sep 17 00:00:00 2001 From: Steven Kreitzer Date: Wed, 29 Nov 2023 11:41:50 -0600 Subject: [PATCH] fix(descheduler): move to new format --- .../descheduler/app/helmrelease.yaml | 84 ++++++++++--------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/kubernetes/apps/kube-system/descheduler/app/helmrelease.yaml b/kubernetes/apps/kube-system/descheduler/app/helmrelease.yaml index 21d6c6a92f..7f6ba4cc34 100644 --- a/kubernetes/apps/kube-system/descheduler/app/helmrelease.yaml +++ b/kubernetes/apps/kube-system/descheduler/app/helmrelease.yaml @@ -27,63 +27,67 @@ spec: values: replicas: 2 kind: Deployment - schedule: "*/5 * * * *" + deschedulerPolicyAPIVersion: descheduler/v1alpha2 deschedulerPolicy: - strategies: - RemovePodsHavingTooManyRestarts: - enabled: true - params: - podsHavingTooManyRestarts: + profiles: + - name: ProfileName + pluginConfig: + - name: DefaultEvictor + args: + evictSystemCriticalPods: true + evictFailedBarePods: true + evictLocalStoragePods: true + nodeFit: true + - name: RemovePodsHavingTooManyRestarts + args: podRestartThreshold: 5 includingInitContainers: true - RemovePodsViolatingTopologySpreadConstraint: - enabled: true - params: - includeSoftConstraints: true - PodLifeTime: - enabled: true - params: - podLifeTime: + - name: RemovePodsViolatingTopologySpreadConstraint + args: + constraints: + - DoNotSchedule + - name: PodLifeTime + args: states: - Pending - PodInitializing - ContainerCreating maxPodLifeTimeSeconds: 300 - RemoveFailedPods: - enabled: true - params: - failedPods: - reasons: - - Error - - Completed - - NodeShutdown - - ImagePullBackOff - - CreateContainerConfigError - includingInitContainers: true + - name: RemoveFailedPods + args: excludeOwnerKinds: - Job + includingInitContainers: true minPodLifetimeSeconds: 300 - RemoveDuplicates: - enabled: true - RemovePodsViolatingNodeTaints: - enabled: true - RemovePodsViolatingNodeAffinity: - enabled: true - params: - nodeAffinityType: - - requiredDuringSchedulingIgnoredDuringExecution - RemovePodsViolatingInterPodAntiAffinity: - enabled: true - LowNodeUtilization: - enabled: true - params: - nodeResourceUtilizationThresholds: + - name: RemoveDuplicates + - name: RemovePodsViolatingNodeTaints + - name: RemovePodsViolatingNodeAffinity + args: + nodeAffinityType: + - requiredDuringSchedulingIgnoredDuringExecution + - name: RemovePodsViolatingInterPodAntiAffinity + - name: LowNodeUtilization + args: thresholds: cpu: 40 pods: 30 targetThresholds: cpu: 45 pods: 45 + plugins: + balance: + enabled: + - RemoveDuplicates + - LowNodeUtilization + - RemovePodsViolatingTopologySpreadConstraint + deschedule: + enabled: + - PodLifeTime + - RemoveFailedPods + - RemovePodsViolatingNodeTaints + - RemovePodsViolatingNodeAffinity + - RemovePodsHavingTooManyRestarts + - RemovePodsViolatingInterPodAntiAffinity service: enabled: true serviceMonitor: