Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aharonh committed Feb 20, 2023
1 parent 9b33bad commit 35ec6ca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controllers/keda/scaledobject_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ func (r *ScaledObjectReconciler) Reconcile(ctx context.Context, req ctrl.Request
return ctrl.Result{}, err
}

// if the ScaledObject is paused, skip processing the request
_, paused := scaledObject.GetAnnotations()[kedacontrollerutil.PausedReplicasAnnotation]
if paused {
reqLogger.Info("ScaledObject is paused, so skipping the request.")
return ctrl.Result{}, nil
}

reqLogger.Info("Reconciling ScaledObject")

// Check if the ScaledObject instance is marked to be deleted, which is
Expand Down

0 comments on commit 35ec6ca

Please sign in to comment.