Skip to content

Commit

Permalink
fix(propagation): skip non-ready clusters (#870)
Browse files Browse the repository at this point in the history
Clusters which are not accessible block the deletion.
This skips clusters which cannot be accessed.
  • Loading branch information
IvoGoman authored Jan 29, 2025
1 parent 01113c6 commit 60de214
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controllers/propagation_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ func (r *PropagationReconciler) Reconcile(ctx context.Context, req ctrl.Request)

// TODO parallelize
for _, cluster := range clusterList.Items {
// skip clusters that are no longer accessible
if !cluster.Status.StatusConditions.IsReadyTrue() {
continue
}

// get corresponding secret to access the cluster
var secret = new(corev1.Secret)
if err := r.Get(ctx, types.NamespacedName{Name: cluster.GetSecretName(), Namespace: cluster.GetNamespace()}, secret); err != nil {
Expand Down

0 comments on commit 60de214

Please sign in to comment.