Skip to content

Commit

Permalink
Update controller/controlplane/controller_watch.go
Browse files Browse the repository at this point in the history
Co-authored-by: Jakub Warczarek <[email protected]>
  • Loading branch information
pmalek and programmer04 authored Jul 8, 2024
1 parent 30a8769 commit 185d955
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions controller/controlplane/controller_watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,11 @@ func objectIsOwnedByControlPlane(obj client.Object, cp *operatorv1beta1.ControlP
return true
}

if labels := obj.GetLabels(); len(labels) > 0 {
if labels[consts.GatewayOperatorManagedByNameLabel] == cp.Name {
if obj.GetNamespace() != "" {
return cp.GetNamespace() == obj.GetNamespace()
} else {
return true
}
if labels[consts.GatewayOperatorManagedByNameLabel] == cp.Name {

Check failure on line 178 in controller/controlplane/controller_watch.go

View workflow job for this annotation

GitHub Actions / build

undefined: labels

Check failure on line 178 in controller/controlplane/controller_watch.go

View workflow job for this annotation

GitHub Actions / lint

undefined: labels) (typecheck)

Check failure on line 178 in controller/controlplane/controller_watch.go

View workflow job for this annotation

GitHub Actions / lint

undefined: labels) (typecheck)

Check failure on line 178 in controller/controlplane/controller_watch.go

View workflow job for this annotation

GitHub Actions / lint

undefined: labels (typecheck)

Check failure on line 178 in controller/controlplane/controller_watch.go

View workflow job for this annotation

GitHub Actions / lint

undefined: labels) (typecheck)

Check failure on line 178 in controller/controlplane/controller_watch.go

View workflow job for this annotation

GitHub Actions / conformance-tests (traditional_compatible)

undefined: labels

Check failure on line 178 in controller/controlplane/controller_watch.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: labels

Check failure on line 178 in controller/controlplane/controller_watch.go

View workflow job for this annotation

GitHub Actions / conformance-tests (expressions)

undefined: labels
if obj.GetNamespace() != "" {
return cp.GetNamespace() == obj.GetNamespace()
} else {
return true
}
}

Expand Down

0 comments on commit 185d955

Please sign in to comment.