Merge pull request #89236 from liggitt/fix-gc-test

Restore orphaning check in gc test
This commit is contained in:
Kubernetes Prow Robot 2020-03-19 06:07:14 -07:00 committed by GitHub
commit 0f336e09e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -461,6 +461,9 @@ func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet
}
orphan := false
switch {
case options.OrphanDependents == nil && options.PropagationPolicy == nil && len(initialFinalizers) == 0:
// if there are no deletion options, the default policy for replication controllers is orphan
orphan = true
case options.OrphanDependents != nil:
// if the deletion options explicitly specify whether to orphan, that controls
orphan = *options.OrphanDependents