Skip to content

Commit 90edd81

Browse files
authored
Merge pull request #5645 from giantswarm/paused-cluster-return
🐛 Return early if Cluster is paused
2 parents 0eb6d7f + 1614a0c commit 90edd81

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

exp/controllers/awsmachinepool_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ func (r *AWSMachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Reque
158158
return ctrl.Result{}, nil
159159
}
160160

161+
// Return early if the object or Cluster is paused.
162+
if annotations.IsPaused(cluster, awsMachinePool) {
163+
log.Info("Reconciliation is paused for this object")
164+
return ctrl.Result{}, nil
165+
}
166+
161167
// Create the machine pool scope
162168
machinePoolScope, err := scope.NewMachinePoolScope(scope.MachinePoolScopeParams{
163169
Client: r.Client,

0 commit comments

Comments
 (0)