Skip to content

Commit

Permalink
fix: The paused-replicas annotation not fully respected (kedacore#4253)
Browse files Browse the repository at this point in the history
Signed-off-by: aharonh <[email protected]>
  • Loading branch information
aharonh committed Feb 21, 2023
1 parent 9b33bad commit 54148ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio

## Unreleased

- **General**

### Breaking Changes

- TODO
- TODO

### New

Here is an overview of all **stable** additions:

- **General**: Improve error logging by skipping reconciliation and therefore logging of errors related to paused ScaledObject ([#4254](https://github.com/kedacore/keda/issues/4254))
- **General**: Add support to register custom CAs globally in KEDA operator ([#4168](https://github.com/kedacore/keda/issues/4168))
- **General**: Introduce admission webhooks to automatically validate resource changes to prevent misconfiguration and enforce best practices ([#3755](https://github.com/kedacore/keda/issues/3755))
- **General**: Introduce new ArangoDB Scaler ([#4000](https://github.com/kedacore/keda/issues/4000))
Expand Down
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 54148ad

Please sign in to comment.