From 851e6ff66c3c89fba19cbdbd46132846bc748645 Mon Sep 17 00:00:00 2001 From: Shuhei Kitagawa Date: Tue, 22 Aug 2023 08:05:23 +0900 Subject: [PATCH] Set builder.OnlyMetadata back for Secrets (#2625) Signed-off-by: shuheiktgw --- pkg/controllers/externalsecret/externalsecret_controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/controllers/externalsecret/externalsecret_controller.go b/pkg/controllers/externalsecret/externalsecret_controller.go index 03635db7d..288a43a39 100644 --- a/pkg/controllers/externalsecret/externalsecret_controller.go +++ b/pkg/controllers/externalsecret/externalsecret_controller.go @@ -31,6 +31,7 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" @@ -603,6 +604,6 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, opts controller.Options) return ctrl.NewControllerManagedBy(mgr). WithOptions(opts). For(&esv1beta1.ExternalSecret{}). - Owns(&v1.Secret{}). + Owns(&v1.Secret{}, builder.OnlyMetadata). Complete(r) }