Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent git server from running #97

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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