@@ -19,15 +19,16 @@ import (
1919 "sigs.k8s.io/controller-runtime/pkg/healthz"
2020 "sigs.k8s.io/controller-runtime/pkg/metrics/server"
2121
22- "github.com/platform-mesh/security-operator/internal/controller"
2322 mcmanager "sigs.k8s.io/multicluster-runtime/pkg/manager"
23+
24+ "github.com/platform-mesh/security-operator/internal/controller"
2425)
2526
2627var initializerCmd = & cobra.Command {
2728 Use : "initializer" ,
2829 Short : "FGA initializer for the organization workspacetype" ,
2930 RunE : func (cmd * cobra.Command , args []string ) error {
30- ctx , _ , shutdown := pmcontext .StartContext (log , appCfg , defaultCfg .ShutdownTimeout )
31+ ctx , _ , shutdown := pmcontext .StartContext (log , initializerCfg , defaultCfg .ShutdownTimeout )
3132 defer shutdown ()
3233
3334 mgrCfg := ctrl .GetConfigOrDie ()
@@ -57,7 +58,7 @@ var initializerCmd = &cobra.Command{
5758 }
5859
5960 provider , err := initializingworkspaces .New (mgrCfg , initializingworkspaces.Options {
60- InitializerName : appCfg .InitializerName ,
61+ InitializerName : initializerCfg .InitializerName ,
6162 Scheme : mgrOpts .Scheme ,
6263 })
6364 if err != nil {
@@ -93,11 +94,11 @@ var initializerCmd = &cobra.Command{
9394 os .Exit (1 )
9495 }
9596
96- if appCfg .IDP .AdditionalRedirectURLs == nil {
97- appCfg .IDP .AdditionalRedirectURLs = []string {}
97+ if initializerCfg .IDP .AdditionalRedirectURLs == nil {
98+ initializerCfg .IDP .AdditionalRedirectURLs = []string {}
9899 }
99100
100- if err := controller .NewLogicalClusterReconciler (log , orgClient , appCfg , inClusterClient , mgr ).
101+ if err := controller .NewLogicalClusterReconciler (log , orgClient , initializerCfg , inClusterClient , mgr ).
101102 SetupWithManager (mgr , defaultCfg ); err != nil {
102103 setupLog .Error (err , "unable to create controller" , "controller" , "LogicalCluster" )
103104 os .Exit (1 )
0 commit comments