You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+81-19Lines changed: 81 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -148,22 +148,66 @@ In general, each plugin can consume metrics from a different provider so multipl
148
148
149
149
The Default Evictor Plugin is used by default for filtering pods before processing them in an strategy plugin, or for applying a PreEvictionFilter of pods before eviction. You can also create your own Evictor Plugin or use the Default one provided by Descheduler. Other uses for the Evictor plugin can be to sort, filter, validate or group pods by different criteria, and that's why this is handled by a plugin and not configured in the top level config.
|`evictSystemCriticalPods`|`bool`|`false`|[Warning: Will evict Kubernetes system pods] allows eviction of pods with any priority, including system pods like kube-dns |
157
-
|`ignorePvcPods`|`bool`|`false`| set whether PVC pods should be evicted or ignored |
158
-
|`evictFailedBarePods`|`bool`|`false`| allow eviction of pods without owner references and in failed phase |
159
-
|`labelSelector`|`metav1.LabelSelector`|| (see [label filtering](#label-filtering)) |
160
-
|`priorityThreshold`|`priorityThreshold`|| (see [priority filtering](#priority-filtering)) |
161
-
|`nodeFit`|`bool`|`false`| (see [node fit filtering](#node-fit-filtering)) |
162
-
|`minReplicas`|`uint`|`0`| ignore eviction of pods where owner (e.g. `ReplicaSet`) replicas is below this threshold |
163
-
|`minPodAge`|`metav1.Duration`|`0`| ignore eviction of pods with a creation time within this threshold |
164
-
|`ignorePodsWithoutPDB`|`bool`|`false`| set whether pods without PodDisruptionBudget should be evicted or ignored |
|`nodeSelector`|`string`|`nil`| Limits the nodes that are processed. |
154
+
|`evictLocalStoragePods`|`bool`|`false`|**[Deprecated: Use `protectionPolicies` with `"podsWithLocalStorage"` instead]**<br>Allows eviction of pods using local storage. |
155
+
|`evictDaemonSetPods`|`bool`|`false`|**[Deprecated: Use `protectionPolicies` with `"daemonSetPods"` instead]**<br>Allows eviction of DaemonSet managed Pods. |
156
+
|`evictSystemCriticalPods`|`bool`|`false`|**[Deprecated: Use `protectionPolicies` with `"systemCriticalPods"` instead]**<br>[Warning: Will evict Kubernetes system pods] Allows eviction of pods with any priority, including system-critical pods like kube-dns. |
157
+
|`ignorePvcPods`|`bool`|`false`|**[Deprecated: Use `protectionPolicies` with `"podsWithPVC"` instead]**<br>Sets whether PVC pods should be evicted or ignored. |
158
+
|`evictFailedBarePods`|`bool`|`false`|**[Deprecated: Use `protectionPolicies` with `"failedBarePods"` instead]**<br>Allows eviction of pods without owner references and in a failed phase. |
159
+
|`labelSelector`|`metav1.LabelSelector`|| (See [label filtering](#label-filtering)) |
160
+
|`priorityThreshold`|`priorityThreshold`|| (See [priority filtering](#priority-filtering)) |
161
+
|`nodeFit`|`bool`|`false`| (See [node fit filtering](#node-fit-filtering)) |
162
+
|`minReplicas`|`uint`|`0`| Ignores eviction of pods where the owner (e.g., `ReplicaSet`) replicas are below this threshold. |
163
+
|`minPodAge`|`metav1.Duration`|`0`| Ignores eviction of pods with a creation time within this threshold. |
164
+
|`ignorePodsWithoutPDB`|`bool`|`false`|**[Deprecated: Use `protectionPolicies` with `"podsWithoutPDB"` instead]**<br>Sets whether pods without PodDisruptionBudget should be evicted or ignored. |
165
+
| `protectionPolicies` | `PodProtections` | `{}` | Holds the list of enabled and disabled protection policies.<br>Users can selectively disable certain default protection rules or enable extra ones. See below for supported values. |### Example policy
166
+
167
+
#### Supported Values for `protectionPolicies.Disabled`
|`"podsWithPVC"`| Prevents eviction of Pods using Persistent Volume Claims (PVCs). Equivalent to old field `ignorePvcPods: true`. |
185
+
|`"podsWithoutPDB"`| Prevents eviction of Pods without a PodDisruptionBudget (PDB). Equivalent to old field `ignorePodsWithoutPDB: true`. |
186
+
187
+
> Setting these values will **enable additional protection rules**, meaning these Pods will not be evicted.
188
+
189
+
---
190
+
191
+
#### Example: Migrating from Old Fields to New Fields
192
+
193
+
#### Old YAML:
194
+
195
+
```yaml
196
+
evictSystemCriticalPods: false
197
+
evictLocalStoragePods: false
198
+
ignorePvcPods: true
199
+
ignorePodsWithoutPDB: true
200
+
```
201
+
#### New YAML:
202
+
```yaml
203
+
protectionPolicies:
204
+
disabled:
205
+
- podsWithLocalStorage
206
+
- systemCriticalPods
207
+
extraEnabled:
208
+
- podsWithPVC
209
+
- podsWithoutPDB
210
+
```
167
211
168
212
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.
169
213
@@ -193,11 +237,29 @@ profiles:
193
237
pluginConfig:
194
238
- name: "DefaultEvictor"
195
239
args:
196
-
evictSystemCriticalPods: true
197
-
evictFailedBarePods: true
198
-
evictLocalStoragePods: true
240
+
# Deprecated: Use `disabledDefaultPodProtections` with "systemCriticalPods" instead.
241
+
# evictSystemCriticalPods: true
242
+
# Deprecated: Use `disabledDefaultPodProtections` with "failedBarePods" instead.
243
+
# evictFailedBarePods: true
244
+
# Deprecated: Use `disabledDefaultPodProtections` with "withLocalStorage" instead.
245
+
# evictLocalStoragePods: true
199
246
nodeFit: true
200
247
minReplicas: 2
248
+
# PodProtectionPolicies holds the list of enabled and disabled protection policies.
249
+
# Users can selectively disable certain default protection rules or enable extra ones.
250
+
protectionPolicies:
251
+
# ExtraEnabled specifies additional protection policies that should be enabled.
252
+
# Supports: podsWithPVC, podsWithoutPDB
253
+
extraEnabled:
254
+
# - podsWithPVC
255
+
# - podsWithoutPDB
256
+
257
+
# Disabled specifies which default protection policies should be disabled.
0 commit comments