PodGC should not add DisruptionTarget condition for pods which are in terminal phase

This commit is contained in:
Michal Wozniak
2023-01-13 12:08:52 +01:00
parent e51fe4a61c
commit 3833c0c349
3 changed files with 42 additions and 45 deletions

View File

@@ -239,10 +239,11 @@ func TestGCOrphaned(t *testing.T) {
pods: []*v1.Pod{
makePod("a", "deleted", v1.PodFailed),
makePod("b", "deleted", v1.PodSucceeded),
makePod("c", "deleted", v1.PodRunning),
},
itemsInQueue: 1,
deletedPodNames: sets.NewString("a", "b"),
patchedPodNames: sets.NewString("a", "b"),
deletedPodNames: sets.NewString("a", "b", "c"),
patchedPodNames: sets.NewString("c"),
enablePodDisruptionConditions: true,
},
{