Skip to content

Commit c4472ee

Browse files
committed
serviceexportrbac reconciler: don't set Controller=True in owner refs
1 parent bd4adba commit c4472ee

2 files changed

Lines changed: 0 additions & 11 deletions

File tree

backend/controllers/serviceexportrbac/rbac_reconciler.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
apierrors "k8s.io/apimachinery/pkg/api/errors"
3030
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3131
utilerrors "k8s.io/apimachinery/pkg/util/errors"
32-
"k8s.io/utils/ptr"
3332
"sigs.k8s.io/controller-runtime/pkg/cache"
3433
"sigs.k8s.io/controller-runtime/pkg/client"
3534
"sigs.k8s.io/controller-runtime/pkg/log"
@@ -159,7 +158,6 @@ func (r *reconciler) reconcile(ctx context.Context, client client.Client, cache
159158
APIVersion: "v1",
160159
Kind: "Namespace",
161160
Name: ns.Name,
162-
Controller: ptr.To(true),
163161
UID: ns.UID,
164162
},
165163
}

backend/controllers/serviceexportrbac/rbac_reconciler_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828
apierrors "k8s.io/apimachinery/pkg/api/errors"
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3030
"k8s.io/apimachinery/pkg/types"
31-
"k8s.io/utils/ptr"
3231
"sigs.k8s.io/controller-runtime/pkg/cache"
3332
"sigs.k8s.io/controller-runtime/pkg/client"
3433

@@ -271,7 +270,6 @@ func Test_reconciler_reconcile(t *testing.T) {
271270
APIVersion: "v1",
272271
Kind: "Namespace",
273272
Name: "kube-binder-abcd1234",
274-
Controller: ptr.To(true),
275273
UID: "uid-123",
276274
},
277275
},
@@ -300,7 +298,6 @@ func Test_reconciler_reconcile(t *testing.T) {
300298
APIVersion: "v1",
301299
Kind: "Namespace",
302300
Name: "kube-binder-abcd1234",
303-
Controller: ptr.To(true),
304301
UID: "uid-123",
305302
},
306303
},
@@ -419,7 +416,6 @@ func Test_reconciler_reconcile(t *testing.T) {
419416
APIVersion: "v1",
420417
Kind: "Namespace",
421418
Name: "kube-binder-abcd1234",
422-
Controller: ptr.To(true),
423419
UID: "uid-123",
424420
},
425421
},
@@ -448,7 +444,6 @@ func Test_reconciler_reconcile(t *testing.T) {
448444
APIVersion: "v1",
449445
Kind: "Namespace",
450446
Name: "kube-binder-abcd1234",
451-
Controller: ptr.To(true),
452447
UID: "uid-123",
453448
},
454449
},
@@ -537,7 +532,6 @@ func Test_reconciler_reconcile(t *testing.T) {
537532
APIVersion: "v1",
538533
Kind: "Namespace",
539534
Name: "kube-binder-abcd1234",
540-
Controller: ptr.To(true),
541535
UID: "uid-123",
542536
},
543537
},
@@ -566,7 +560,6 @@ func Test_reconciler_reconcile(t *testing.T) {
566560
APIVersion: "v1",
567561
Kind: "Namespace",
568562
Name: "kube-binder-abcd1234",
569-
Controller: ptr.To(true),
570563
UID: "uid-123",
571564
},
572565
},
@@ -736,7 +729,6 @@ func Test_reconciler_reconcile(t *testing.T) {
736729
APIVersion: "v1",
737730
Kind: "Namespace",
738731
Name: "kube-binder-abcd1234",
739-
Controller: ptr.To(true),
740732
UID: "uid-123",
741733
},
742734
},
@@ -765,7 +757,6 @@ func Test_reconciler_reconcile(t *testing.T) {
765757
APIVersion: "v1",
766758
Kind: "Namespace",
767759
Name: "kube-binder-abcd1234",
768-
Controller: ptr.To(true),
769760
UID: "uid-123",
770761
},
771762
},

0 commit comments

Comments
 (0)