Skip to content

Commit

Permalink
Update controllers/tenant_compile_pipeline_controller.go
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Widmer <sebastian.widmer@vshn.net>
  • Loading branch information
HappyTetrahedron and bastjan authored Jul 26, 2024
1 parent 9b99160 commit 1daf931
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions controllers/tenant_compile_pipeline_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,15 @@ func (r *TenantCompilePipelineReconciler) Reconcile(ctx context.Context, request

nsName := types.NamespacedName{Name: clusterName, Namespace: tenant.GetNamespace()}
err := r.Client.Get(ctx, nsName, cluster)
if err != nil && !errors.IsNotFound(err) {
if err != nil {
if errors.IsNotFound(err) {
reqLogger.Info("Could not find cluster from list in .Status.CompilePipeline.Clusters", "clusterName", clusterName)
continue
}
return reconcile.Result{}, fmt.Errorf("while reconciling CI variables for clusters: %w", err)
}
if err != nil && errors.IsNotFound(err) {
reqLogger.Info("Could not find cluster from list in .Status.CompilePipeline.Clusters", "clusterName", clusterName)
}

if err == nil {
changed = ensureClusterCiVariable(tenant, cluster) || changed
}
changed = ensureClusterCiVariable(tenant, cluster) || changed
}
if changed {
err = r.Client.Update(ctx, tenant)
Expand Down

0 comments on commit 1daf931

Please sign in to comment.