Wait for Pods to finish before considering Failed in Job (#113860)

* Wait for Pods to finish before considering Failed

Limit behavior to feature gates PodDisruptionConditions and
JobPodFailurePolicy and jobs with a podFailurePolicy.

Change-Id: I926391cc2521b389c8e52962afb0d4a6a845ab8f

* Remove check for unsheduled terminating pod

Change-Id: I3dc05bb4ea3738604f01bf8cb5fc8cc0f6ea54ec
This commit is contained in:
Aldo Culquicondor
2022-11-15 12:44:53 -05:00
committed by GitHub
parent dc7fd39eb7
commit 7dc36bdf82
4 changed files with 323 additions and 183 deletions

View File

@@ -538,6 +538,7 @@ func CreateZoneID(region, zone string) string {
// GetKey is a helper function used by controllers unit tests to get the
// key for a given kubernetes resource.
func GetKey(obj interface{}, t *testing.T) string {
t.Helper()
tombstone, ok := obj.(cache.DeletedFinalStateUnknown)
if ok {
// if tombstone , try getting the value from tombstone.Obj