mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Fix removing finalizer for garbage collector
The loop should use 'continue' not 'break', otherwise removeFinalizer() not only removes "orphaningFinalizer" from its finalizers list but also removes others.
This commit is contained in:
parent
343d751bc5
commit
23a90a7679
@ -115,7 +115,7 @@ func (gc *GarbageCollector) removeFinalizer(owner *node, targetFinalizer string)
|
||||
for _, f := range finalizers {
|
||||
if f == targetFinalizer {
|
||||
found = true
|
||||
break
|
||||
continue
|
||||
}
|
||||
newFinalizers = append(newFinalizers, f)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user