From f1891752c54325f4dbde3b34738c33453797a26d Mon Sep 17 00:00:00 2001 From: Zhenghan Zhou Date: Tue, 18 Jul 2023 16:04:06 +0800 Subject: [PATCH 1/3] Add Paused Annotation Doc Signed-off-by: SpiritZhou --- content/docs/2.12/concepts/scaling-deployments.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/docs/2.12/concepts/scaling-deployments.md b/content/docs/2.12/concepts/scaling-deployments.md index 71c99f6e5..f13905117 100644 --- a/content/docs/2.12/concepts/scaling-deployments.md +++ b/content/docs/2.12/concepts/scaling-deployments.md @@ -41,6 +41,7 @@ metadata: annotations: scaledobject.keda.sh/transfer-hpa-ownership: "true" # Optional. Use to transfer an existing HPA ownership to this ScaledObject autoscaling.keda.sh/paused-replicas: "0" # Optional. Use to pause autoscaling of objects + autoscaling.keda.sh/paused: "true" # Optional. Use to pause autoscaling of objects explicitly spec: scaleTargetRef: apiVersion: {api-version-of-target-resource} # Optional. Default: apps/v1 @@ -241,6 +242,7 @@ It can be useful to instruct KEDA to pause autoscaling of objects, if you want t metadata: annotations: autoscaling.keda.sh/paused-replicas: "0" + autoscaling.keda.sh/paused: "true" ``` The presensce of this annotation will pause autoscaling no matter what number of replicas is provided. The above annotation will scale your current workload to 0 replicas and pause autoscaling. You can set the value of replicas for an object to be paused at to any arbitary number. To enable autoscaling again, simply remove the annotation from the `ScaledObject` definition. From 46124a57766ce06b2067f316b1529cac900ef17e Mon Sep 17 00:00:00 2001 From: SpiritZhou Date: Thu, 14 Sep 2023 10:25:53 +0800 Subject: [PATCH 2/3] Update Signed-off-by: SpiritZhou --- content/docs/2.12/concepts/scaling-deployments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/2.12/concepts/scaling-deployments.md b/content/docs/2.12/concepts/scaling-deployments.md index f13905117..c3bd806e2 100644 --- a/content/docs/2.12/concepts/scaling-deployments.md +++ b/content/docs/2.12/concepts/scaling-deployments.md @@ -245,7 +245,7 @@ metadata: autoscaling.keda.sh/paused: "true" ``` -The presensce of this annotation will pause autoscaling no matter what number of replicas is provided. The above annotation will scale your current workload to 0 replicas and pause autoscaling. You can set the value of replicas for an object to be paused at to any arbitary number. To enable autoscaling again, simply remove the annotation from the `ScaledObject` definition. +The presensce of these annotations will pause autoscaling no matter what number of replicas is provided. The annotation `autoscaling.keda.sh/paused-replicas` will paused scaling immediately. And the annotation `autoscaling.keda.sh/paused-replicas: "0"` will scale your current workload to 0 replicas and pause autoscaling. You can set the value of replicas for an object to be paused at to any arbitary number. If both `paused-replicas` and `paused-replicas` are set, KEDA will scale your current workload to the number specified count in `paused-replicas` and then pause autoscaling. To enable autoscaling again, simply remove all paused annotations from the `ScaledObject` definition. ### Activating and Scaling thresholds From 9f2bbfdd9d4f4ea484c62fe84d4a5611d741d3f7 Mon Sep 17 00:00:00 2001 From: SpiritZhou Date: Fri, 15 Sep 2023 09:48:36 +0800 Subject: [PATCH 3/3] Update content/docs/2.12/concepts/scaling-deployments.md Co-authored-by: Tom Kerkhove Signed-off-by: SpiritZhou --- content/docs/2.12/concepts/scaling-deployments.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content/docs/2.12/concepts/scaling-deployments.md b/content/docs/2.12/concepts/scaling-deployments.md index c3bd806e2..44d74ffee 100644 --- a/content/docs/2.12/concepts/scaling-deployments.md +++ b/content/docs/2.12/concepts/scaling-deployments.md @@ -245,7 +245,13 @@ metadata: autoscaling.keda.sh/paused: "true" ``` -The presensce of these annotations will pause autoscaling no matter what number of replicas is provided. The annotation `autoscaling.keda.sh/paused-replicas` will paused scaling immediately. And the annotation `autoscaling.keda.sh/paused-replicas: "0"` will scale your current workload to 0 replicas and pause autoscaling. You can set the value of replicas for an object to be paused at to any arbitary number. If both `paused-replicas` and `paused-replicas` are set, KEDA will scale your current workload to the number specified count in `paused-replicas` and then pause autoscaling. To enable autoscaling again, simply remove all paused annotations from the `ScaledObject` definition. +The presence of these annotations will pause autoscaling no matter what number of replicas is provided. + +The annotation `autoscaling.keda.sh/paused` will pause scaling immediately and use the current instance count while the annotation `autoscaling.keda.sh/paused-replicas: ""` will scale your current workload to specified amount of replicas and pause autoscaling. You can set the value of replicas for an object to be paused to any arbitrary number. + +Typically, either one or the other is being used given they serve a different purpose/scenario. However, if both `paused` and `paused-replicas` are set, KEDA will scale your current workload to the number specified count in `paused-replicas` and then pause autoscaling. + +To enable/unpause autoscaling again, simply remove all paused annotations from the `ScaledObject` definition. ### Activating and Scaling thresholds