Skip to content

Commit

Permalink
prevent git server from running (#97)
Browse files Browse the repository at this point in the history
Signed-off-by: Manabu Mccloskey <[email protected]>
  • Loading branch information
nabuskey authored Nov 29, 2023
1 parent ab6d14d commit 9084ef8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
19 changes: 1 addition & 18 deletions pkg/controllers/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"),
Expand Down
4 changes: 2 additions & 2 deletions pkg/kind/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand All @@ -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 {
Expand Down

0 comments on commit 9084ef8

Please sign in to comment.