Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docs for pausing ScaledJobs #1168

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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