-
Notifications
You must be signed in to change notification settings - Fork 793
fix(removefailedpods): allow opt-in eviction of failed system-critical pods #1865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,11 +25,12 @@ import ( | |
| type RemoveFailedPodsArgs struct { | ||
| metav1.TypeMeta `json:",inline"` | ||
|
|
||
| Namespaces *api.Namespaces `json:"namespaces,omitempty"` | ||
| LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` | ||
| ExcludeOwnerKinds []string `json:"excludeOwnerKinds,omitempty"` | ||
| MinPodLifetimeSeconds *uint `json:"minPodLifetimeSeconds,omitempty"` | ||
| Reasons []string `json:"reasons,omitempty"` | ||
| ExitCodes []int32 `json:"exitCodes,omitempty"` | ||
| IncludingInitContainers bool `json:"includingInitContainers,omitempty"` | ||
| Namespaces *api.Namespaces `json:"namespaces,omitempty"` | ||
| LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` | ||
| ExcludeOwnerKinds []string `json:"excludeOwnerKinds,omitempty"` | ||
| MinPodLifetimeSeconds *uint `json:"minPodLifetimeSeconds,omitempty"` | ||
| Reasons []string `json:"reasons,omitempty"` | ||
| ExitCodes []int32 `json:"exitCodes,omitempty"` | ||
| IncludingInitContainers bool `json:"includingInitContainers,omitempty"` | ||
| IncludingSystemCriticalPods bool `json:"includingSystemCriticalPods,omitempty"` | ||
| } | ||
|
Comment on lines
25
to
36
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small consistency thing: we already have EvictSystemCriticalPods on DefaultEvictor, and the docs/issues all use that wording. Could we name this one along the same lines — e.g.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in f05b631 — renamed to |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you double-checked that the new field is wired through any versioned API types as well? If RemoveFailedPodsArgs has a counterpart under pkg/api/v1alphaX/, the YAML decode path will silently drop includingSystemCriticalPods and the flag will look like it does nothing in real configs even though tests pass. Probably fine, but worth a grep -r RemoveFailedPodsArgs pkg/api/ to confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked —
grep -rn RemoveFailedPodsArgs pkg/api/returns nothing. Descheduler doesn't use the apimachinery per-plugin versioned-types pattern; plugin args are registered viapluginregistry.Registerand decoded throughpluginArgConversionSchemewith the internalRemoveFailedPodsArgsas the target type, so the new field flows through the YAML decode path without a v1alpha2 shadow. The existingzz_generated.deepcopy.gouses*out = *inwhich already covers the new bool.