Skip to content

Commit

Permalink
add docs for pausing ScaledJobs
Browse files Browse the repository at this point in the history
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
  • Loading branch information
zroubalik committed Jun 22, 2023
1 parent 36f1cd7 commit 7d5898d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions content/docs/2.11/concepts/scaling-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ metadata:
labels:
my-label: my-label-value # labels on the ScaledJob will be copied to each Job
annotations:
autoscaling.keda.sh/paused: true # Optional. Use to pause autoscaling of Jobs
my-annotation: my-annotation-value # annotations on the ScaledJob will be copied to each Job
spec:
jobTargetRef:
Expand Down Expand Up @@ -253,6 +254,22 @@ Select a behavior if you have multiple triggers. Possible values are `max`, `min
* **avg:** - Sum up all the active scalers metrics and divide by the number of active scalers.
* **sum:** - Sum up all the active scalers metrics.

### Pause autoscaling

It can be useful to instruct KEDA to pause the autoscaling of objects, if you want to do to cluster maintenance or you want to avoid resource starvation by removing non-mission-critical workloads.

This is a great alternative to deleting the resource, because we do not want to touch the applications themselves but simply remove the instances it is running from an operational perspective. Once everything is good to go, we can enable it to scale again.

You can enable this by adding the below annotation to your `ScaledJob` definition:

```yaml
metadata:
annotations:
autoscaling.keda.sh/paused: true
```
The above annotation will pause autoscaling. To enable autoscaling again, simply remove the annotation from the `ScaledJob` definition.

# Sample

```yaml
Expand Down

0 comments on commit 7d5898d

Please sign in to comment.