mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
only apply this check if the controller is actually namespaced
Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
This commit is contained in:
parent
9ceb226c06
commit
b3e4fed844
@ -108,7 +108,7 @@ func (m *BaseControllerRefManager) ClaimObject(ctx context.Context, obj metav1.O
|
||||
return false, nil
|
||||
}
|
||||
|
||||
if m.Controller.GetNamespace() != obj.GetNamespace() {
|
||||
if len(m.Controller.GetNamespace()) > 0 && m.Controller.GetNamespace() != obj.GetNamespace() {
|
||||
// Ignore if namespace not match
|
||||
return false, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user