diff --git a/README.md b/README.md index c584994c0..871c9577e 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ The Default Evictor Plugin is used by default for filtering pods before processi ### Example policy -As part of the policy, you will start deciding which top level configuration to use, then which Evictor plugin to use (if you have your own, the Default Evictor if not), followed by deciding the configuration passed to the Evictor Plugin. After that you will enable/disable eviction strategies plugins and configure them properly. +As part of the policy, you will start deciding which top level configuration to use, then which Evictor plugin to use (if you have your own, the Default Evictor if not), followed by deciding the configuration passed to the Evictor Plugin. By default, the Default Evictor is enabled for both `filter` and `preEvictionFilter` extension points. After that you will enable/disable eviction strategies plugins and configure them properly. See each strategy plugin section for details on available parameters. @@ -147,9 +147,13 @@ profiles: evictLocalStoragePods: true nodeFit: true plugins: - evict: - enabled: - - "DefaultEvictor" + # DefaultEvictor is enabled for both `filter` and `preEvictionFilter` + # filter: + # enabled: + # - "DefaultEvictor" + # preEvictionFilter: + # enabled: + # - "DefaultEvictor" deschedule: enabled: - ... @@ -211,15 +215,11 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemoveDuplicates" args: - excludeOwnerKinds: + excludeOwnerKinds: - "ReplicaSet" plugins: - evict: - enabled: - - "DefaultEvictor" balance: enabled: - "RemoveDuplicates" @@ -278,7 +278,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "LowNodeUtilization" args: thresholds: @@ -290,9 +289,6 @@ profiles: "memory": 50 "pods": 50 plugins: - evict: - enabled: - - "DefaultEvictor" balance: enabled: - "LowNodeUtilization" @@ -358,7 +354,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "HighNodeUtilization" args: thresholds: @@ -369,11 +364,8 @@ profiles: namespaces: exclude: - "kube-system" - - "namespace1" + - "namespace1" plugins: - evict: - enabled: - - "DefaultEvictor" balance: enabled: - "HighNodeUtilization" @@ -413,12 +405,8 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemovePodsViolatingInterPodAntiAffinity" plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "RemovePodsViolatingInterPodAntiAffinity" @@ -458,15 +446,11 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemovePodsViolatingNodeAffinity" args: nodeAffinityType: - "requiredDuringSchedulingIgnoredDuringExecution" plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "RemovePodsViolatingNodeAffinity" @@ -502,16 +486,12 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemovePodsViolatingNodeTaints" args: excludedTaints: - dedicated=special-user # exclude taints with key "dedicated" and value "special-user" - reserved # exclude all taints with key "reserved" plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "RemovePodsViolatingNodeTaints" @@ -544,14 +524,10 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemovePodsViolatingTopologySpreadConstraint" args: includeSoftConstraints: false plugins: - evict: - enabled: - - "DefaultEvictor" balance: enabled: - "RemovePodsViolatingTopologySpreadConstraint" @@ -583,15 +559,11 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemovePodsHavingTooManyRestarts" args: podRestartThreshold: 100 includingInitContainers: true plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "RemovePodsHavingTooManyRestarts" @@ -625,7 +597,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "PodLifeTime" args: maxPodLifeTimeSeconds: 86400 @@ -633,9 +604,6 @@ profiles: - "Pending" - "PodInitializing" plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "PodLifeTime" @@ -669,7 +637,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemoveFailedPods" args: reasons: @@ -679,9 +646,6 @@ profiles: - "Job" minPodLifetimeSeconds: 3600 plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "RemoveFailedPods" @@ -713,7 +677,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "PodLifeTime" args: maxPodLifeTimeSeconds: 86400 @@ -722,9 +685,6 @@ profiles: - "namespace1" - "namespace2" plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "PodLifeTime" @@ -739,7 +699,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "PodLifeTime" args: maxPodLifeTimeSeconds: 86400 @@ -748,9 +707,6 @@ profiles: - "namespace1" - "namespace2" plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "PodLifeTime" @@ -786,9 +742,6 @@ profiles: args: maxPodLifeTimeSeconds: 86400 plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "PodLifeTime" @@ -809,9 +762,6 @@ profiles: args: maxPodLifeTimeSeconds: 86400 plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "PodLifeTime" @@ -843,7 +793,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "PodLifeTime" args: maxPodLifeTimeSeconds: 86400 @@ -854,9 +803,6 @@ profiles: - {key: tier, operator: In, values: [cache]} - {key: environment, operator: NotIn, values: [dev]} plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "PodLifeTime" @@ -887,9 +833,6 @@ profiles: args: maxPodLifeTimeSeconds: 86400 plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "PodLifeTime" diff --git a/docs/user-guide.md b/docs/user-guide.md index ae2f814a6..f93c3f290 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -58,14 +58,10 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "PodLifeTime" args: maxPodLifeTimeSeconds: 604800 plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "PodLifeTime" @@ -73,7 +69,7 @@ profiles: ### Balance Cluster By Node Memory Utilization If your cluster has been running for a long period of time, you may find that the resource utilization is not very -balanced. The following two strategies can be used to rebalance your cluster based on `cpu`, `memory` +balanced. The following two strategies can be used to rebalance your cluster based on `cpu`, `memory` or `number of pods`. #### Balance high utilization nodes @@ -86,7 +82,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "LowNodeUtilization" args: thresholds: @@ -94,9 +89,6 @@ profiles: targetThresholds: "memory": 70 plugins: - evict: - enabled: - - "DefaultEvictor" balance: enabled: - "LowNodeUtilization" @@ -113,15 +105,11 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "HighNodeUtilization" args: thresholds: "memory": 20 plugins: - evict: - enabled: - - "DefaultEvictor" balance: enabled: - "HighNodeUtilization" diff --git a/examples/failed-pods.yaml b/examples/failed-pods.yaml index a9b5a678c..b645509e3 100644 --- a/examples/failed-pods.yaml +++ b/examples/failed-pods.yaml @@ -3,7 +3,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemoveFailedPods" args: reasons: @@ -14,9 +13,6 @@ profiles: - "Job" minPodLifetimeSeconds: 3600 plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "RemoveFailedPods" diff --git a/examples/high-node-utilization.yml b/examples/high-node-utilization.yml index 411be05be..ff3eb0211 100644 --- a/examples/high-node-utilization.yml +++ b/examples/high-node-utilization.yml @@ -3,15 +3,11 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "HighNodeUtilization" args: thresholds: "memory": 20 plugins: - evict: - enabled: - - "DefaultEvictor" balance: enabled: - "HighNodeUtilization" diff --git a/examples/low-node-utilization.yml b/examples/low-node-utilization.yml index 8d9e7221c..82359e654 100644 --- a/examples/low-node-utilization.yml +++ b/examples/low-node-utilization.yml @@ -3,7 +3,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "LowNodeUtilization" args: thresholds: @@ -11,9 +10,6 @@ profiles: targetThresholds: "memory": 70 plugins: - evict: - enabled: - - "DefaultEvictor" balance: enabled: - "LowNodeUtilization" diff --git a/examples/node-affinity.yml b/examples/node-affinity.yml index 1a1347e00..5da3b7d03 100644 --- a/examples/node-affinity.yml +++ b/examples/node-affinity.yml @@ -3,15 +3,11 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemovePodsViolatingNodeAffinity" args: nodeAffinityType: - "requiredDuringSchedulingIgnoredDuringExecution" plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "RemovePodsViolatingNodeAffinity" diff --git a/examples/pod-life-time.yml b/examples/pod-life-time.yml index 86b255f90..e2dba86ea 100644 --- a/examples/pod-life-time.yml +++ b/examples/pod-life-time.yml @@ -3,7 +3,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "PodLifeTime" args: maxPodLifeTimeSeconds: 604800 # 7 days @@ -11,9 +10,6 @@ profiles: - "Pending" - "PodInitializing" plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "PodLifeTime" diff --git a/examples/policy.yaml b/examples/policy.yaml index 23bebe751..aa34f3fd3 100644 --- a/examples/policy.yaml +++ b/examples/policy.yaml @@ -3,7 +3,6 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemoveDuplicates" - name: "RemovePodsViolatingInterPodAntiAffinity" - name: "LowNodeUtilization" @@ -24,9 +23,6 @@ profiles: args: includeSoftConstraints: true plugins: - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "RemovePodsViolatingInterPodAntiAffinity" @@ -36,4 +32,3 @@ profiles: - "RemoveDuplicates" - "LowNodeUtilization" - "RemovePodsViolatingTopologySpreadConstraint" - diff --git a/examples/topology-spread-constraint.yaml b/examples/topology-spread-constraint.yaml index ebbbca7da..847f0636c 100644 --- a/examples/topology-spread-constraint.yaml +++ b/examples/topology-spread-constraint.yaml @@ -3,14 +3,10 @@ kind: "DeschedulerPolicy" profiles: - name: ProfileName pluginConfig: - - name: "DefaultEvictor" - name: "RemovePodsViolatingTopologySpreadConstraint" args: includeSoftConstraints: true # Include 'ScheduleAnyways' constraints plugins: - evict: - enabled: - - "DefaultEvictor" balance: enabled: - "RemovePodsViolatingTopologySpreadConstraint" diff --git a/pkg/descheduler/policyconfig_test.go b/pkg/descheduler/policyconfig_test.go index 86a8a0382..8c9e95f28 100644 --- a/pkg/descheduler/policyconfig_test.go +++ b/pkg/descheduler/policyconfig_test.go @@ -875,12 +875,6 @@ profiles: podRestartThreshold: 100 includingInitContainers: true plugins: - filter: - enabled: - - "DefaultEvictor" - evict: - enabled: - - "DefaultEvictor" deschedule: enabled: - "RemovePodsHavingTooManyRestarts"