mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Restore orphaning check in gc test
This commit is contained in:
parent
1a334335bc
commit
69eb837e3b
@ -461,6 +461,9 @@ func setupRCsPods(t *testing.T, gc *garbagecollector.GarbageCollector, clientSet
|
|||||||
}
|
}
|
||||||
orphan := false
|
orphan := false
|
||||||
switch {
|
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:
|
case options.OrphanDependents != nil:
|
||||||
// if the deletion options explicitly specify whether to orphan, that controls
|
// if the deletion options explicitly specify whether to orphan, that controls
|
||||||
orphan = *options.OrphanDependents
|
orphan = *options.OrphanDependents
|
||||||
|
Loading…
Reference in New Issue
Block a user