mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
Merge pull request #101250 from evertrain/master
Bugfix: prevent daemon controller to adopt controller revisions of ot…
This commit is contained in:
@@ -107,6 +107,12 @@ func (m *BaseControllerRefManager) ClaimObject(ctx context.Context, obj metav1.O
|
||||
// Ignore if the object is being deleted
|
||||
return false, nil
|
||||
}
|
||||
|
||||
if len(m.Controller.GetNamespace()) > 0 && m.Controller.GetNamespace() != obj.GetNamespace() {
|
||||
// Ignore if namespace not match
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// Selector matches. Try to adopt.
|
||||
if err := adopt(ctx, obj); err != nil {
|
||||
// If the pod no longer exists, ignore the error.
|
||||
|
||||
Reference in New Issue
Block a user