From 9084ef8db37f70e22de29f799f427c7309505689 Mon Sep 17 00:00:00 2001 From: Manabu McCloskey Date: Wed, 29 Nov 2023 10:16:58 -0800 Subject: [PATCH] prevent git server from running (#97) Signed-off-by: Manabu Mccloskey --- pkg/controllers/run.go | 19 +------------------ pkg/kind/cluster.go | 4 ++-- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/pkg/controllers/run.go b/pkg/controllers/run.go index 13976d56..08181392 100644 --- a/pkg/controllers/run.go +++ b/pkg/controllers/run.go @@ -3,9 +3,7 @@ package controllers import ( "context" - "github.com/cnoe-io/idpbuilder/pkg/apps" "github.com/cnoe-io/idpbuilder/pkg/controllers/gitrepository" - "github.com/cnoe-io/idpbuilder/pkg/controllers/gitserver" "github.com/cnoe-io/idpbuilder/pkg/controllers/localbuild" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -24,22 +22,7 @@ func RunControllers(ctx context.Context, mgr manager.Manager, exitCh chan error, return err } - // Run GitServer controller - appsFS, err := apps.GetAppsFS() - if err != nil { - log.Error(err, "unable to find srv dir in apps fs") - return err - } - if err := (&gitserver.GitServerReconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - Content: appsFS, - }).SetupWithManager(mgr); err != nil { - log.Error(err, "unable to create gitserver controller") - return err - } - - err = (&gitrepository.RepositoryReconciler{ + err := (&gitrepository.RepositoryReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), Recorder: mgr.GetEventRecorderFor("gitrepository-controller"), diff --git a/pkg/kind/cluster.go b/pkg/kind/cluster.go index e9260090..6e3960dd 100644 --- a/pkg/kind/cluster.go +++ b/pkg/kind/cluster.go @@ -128,7 +128,7 @@ func (c *Cluster) Reconcile(ctx context.Context, recreate bool) error { c.provider.Delete(c.name, "") } else { fmt.Printf("Cluster %s already exists\n", c.name) - return c.ReconcileRegistry(ctx) + return nil } } @@ -151,7 +151,7 @@ func (c *Cluster) Reconcile(ctx context.Context, recreate bool) error { fmt.Printf("Done creating cluster %s\n", c.name) - return c.ReconcileRegistry(ctx) + return nil } func (c *Cluster) ExportKubeConfig(name string, internal bool) error {