From bf1e36e3541b17f73fcaab4045369fa896062adb Mon Sep 17 00:00:00 2001 From: ubombar Date: Fri, 22 Mar 2024 11:53:20 +0100 Subject: [PATCH] Add SubNamespace reconciler disabling mechanism --- cmd/main.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index ce7f1fd..8a773ad 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -175,12 +175,14 @@ func main() { os.Exit(1) } } - if err = (&multitenancycontroller.SubNamespaceReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - }).SetupWithManager(mgr); err != nil { - setupLog.Error(err, "unable to create controller", "controller", "SubNamespace") - os.Exit(1) + if !disabledReconcilers.Contains("SubNamespace") { + if err = (&multitenancycontroller.SubNamespaceReconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "SubNamespace") + os.Exit(1) + } } //+kubebuilder:scaffold:builder