From 3153526ce120f7502b417cbc9400f36b64af85f1 Mon Sep 17 00:00:00 2001 From: mahone3297 <329730566@qq.com> Date: Fri, 14 Jul 2023 22:11:20 +0800 Subject: [PATCH] Add a detailed description of the idleReplicaCount field, along with an example. Signed-off-by: mahone3297 <329730566@qq.com> --- content/docs/2.11/concepts/scaling-deployments.md | 4 ++++ content/docs/2.12/concepts/scaling-deployments.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/content/docs/2.11/concepts/scaling-deployments.md b/content/docs/2.11/concepts/scaling-deployments.md index 71c99f6e5..e3319d183 100644 --- a/content/docs/2.11/concepts/scaling-deployments.md +++ b/content/docs/2.11/concepts/scaling-deployments.md @@ -117,6 +117,10 @@ The `cooldownPeriod` only applies after a trigger occurs; when you first create ``` > 💡 **NOTE:** Due to limitations in HPA controller the only supported value for this property is 0, it will not work correctly otherwise. See this [issue](https://github.com/kedacore/keda/issues/2314) for more details. +> +> In some cases, you always need at least `n` pod running. Thus, you can omit this property and set `minReplicaCount` to `n`. +> +> **Example** You set `minReplicaCount` to 1 and `maxReplicaCount` to 10. If there’s no activity on triggers, the target resource is scaled down to `minReplicaCount` (1). Once there are activities, the target resource will scale base on the HPA rule. If there’s no activity on triggers, the resource is again scaled down to `minReplicaCount` (1). If this property is set, KEDA will scale the resource down to this number of replicas. If there's some activity on target triggers KEDA will scale the target resource immediately to `minReplicaCount` and then will be scaling handled by HPA. When there is no activity, the target resource is again scaled down to `idleReplicaCount`. This setting must be less than `minReplicaCount`. diff --git a/content/docs/2.12/concepts/scaling-deployments.md b/content/docs/2.12/concepts/scaling-deployments.md index 71c99f6e5..e3319d183 100644 --- a/content/docs/2.12/concepts/scaling-deployments.md +++ b/content/docs/2.12/concepts/scaling-deployments.md @@ -117,6 +117,10 @@ The `cooldownPeriod` only applies after a trigger occurs; when you first create ``` > 💡 **NOTE:** Due to limitations in HPA controller the only supported value for this property is 0, it will not work correctly otherwise. See this [issue](https://github.com/kedacore/keda/issues/2314) for more details. +> +> In some cases, you always need at least `n` pod running. Thus, you can omit this property and set `minReplicaCount` to `n`. +> +> **Example** You set `minReplicaCount` to 1 and `maxReplicaCount` to 10. If there’s no activity on triggers, the target resource is scaled down to `minReplicaCount` (1). Once there are activities, the target resource will scale base on the HPA rule. If there’s no activity on triggers, the resource is again scaled down to `minReplicaCount` (1). If this property is set, KEDA will scale the resource down to this number of replicas. If there's some activity on target triggers KEDA will scale the target resource immediately to `minReplicaCount` and then will be scaling handled by HPA. When there is no activity, the target resource is again scaled down to `idleReplicaCount`. This setting must be less than `minReplicaCount`.