1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00

PodLifeTime: support CrashLoopBackOff container state

This commit is contained in:
Amir Alavi
2023-06-06 18:15:54 -04:00
parent 877d9b18ee
commit 1b976529bc
2 changed files with 13 additions and 2 deletions

View File

@@ -44,12 +44,14 @@ func ValidatePodLifeTimeArgs(obj runtime.Object) error {
}
}
podLifeTimeAllowedStates := sets.New(
// Pod phase reasons
string(v1.PodRunning),
string(v1.PodPending),
// Container state reasons: https://github.com/kubernetes/kubernetes/blob/release-1.24/pkg/kubelet/kubelet_pods.go#L76-L79
// Container state reasons
"PodInitializing",
"ContainerCreating",
"CrashLoopBackOff",
)
if !podLifeTimeAllowedStates.HasAll(args.States...) {