From 83da9d7bf666b37fffa420de4fadc80f90517433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20B=C3=B6schen?= Date: Mon, 25 Oct 2021 14:48:55 +0200 Subject: [PATCH] Fix error message if IdleReplicaCount is equal to MinReplicaCount MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's a misleading message that made us assume you could have them equal. Looking at the actual check implemented being just for IdleReplicaCount being lower than MinReplicaCount Signed-off-by: Philipp Böschen --- CHANGELOG.md | 1 + controllers/keda/scaledobject_controller.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35aa92e8896..ce805db0347 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ - Add `pageSize` (using regex) in RabbitMQ Scaler ([#2162](https://github.com/kedacore/keda/pull/2162)) - Add `unsafeSsl` parameter in InfluxDB scaler ([#2157](https://github.com/kedacore/keda/pull/2157)) - Improve metric name creation to be unique using scaler index inside the scaler ([#2161](https://github.com/kedacore/keda/pull/2161)) +- Improve error message if `IdleReplicaCount` are equal to `MinReplicaCount` to be the same as the check ([#2212](https://github.com/kedacore/keda/pull/2212)) ### Breaking Changes diff --git a/controllers/keda/scaledobject_controller.go b/controllers/keda/scaledobject_controller.go index db92b0adfb0..5f1daaf93f0 100644 --- a/controllers/keda/scaledobject_controller.go +++ b/controllers/keda/scaledobject_controller.go @@ -342,7 +342,7 @@ func (r *ScaledObjectReconciler) checkReplicaCountBoundsAreValid(scaledObject *k } if scaledObject.Spec.IdleReplicaCount != nil && *scaledObject.Spec.IdleReplicaCount >= min { - return fmt.Errorf("IdleReplicaCount=%d must be less or equal to MinReplicaCount=%d", *scaledObject.Spec.IdleReplicaCount, min) + return fmt.Errorf("IdleReplicaCount=%d must be less than MinReplicaCount=%d", *scaledObject.Spec.IdleReplicaCount, min) } return nil