Skip to content

Commit

Permalink
Dont try to create argo apps when embedded argo apps disabled (#35)
Browse files Browse the repository at this point in the history
* Dont try to create argo apps when embedded argo apps disabled

* Shutdown after no-op of creating argo apps if embedded apps disabled
  • Loading branch information
greghaynes authored Oct 17, 2023
1 parent 353407a commit 1a9acbb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/controllers/localbuild/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ func (r *LocalbuildReconciler) ReconcileEmbeddedGitServer(ctx context.Context, r
func (r *LocalbuildReconciler) ReconcileArgoApps(ctx context.Context, req ctrl.Request, resource *v1alpha1.Localbuild) (ctrl.Result, error) {
log := log.FromContext(ctx)

// Bail if embedded argo applications not enabled
if !resource.Spec.PackageConfigs.EmbeddedArgoApplications.Enabled {
log.Info("embedded argo applications disabled, not installing embedded git server")
r.shouldShutdown = true
return ctrl.Result{}, nil
}

// Create argo project
// DeepEqual is broken on argo resources for some reason so we have to DIY create/update
project := &argov1alpha1.AppProject{
Expand Down

0 comments on commit 1a9acbb

Please sign in to comment.