Bugfix prevent daemon controller to adopt controller revisions of other namespaces
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 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