docs: correct anti-flapping example (#918)
* docs: correct anti-flapping example * docs: provide complete example * docs: use example/myrepo everywhere
This commit is contained in:
parent
0416a9272f
commit
09e6b1839b
30
README.md
30
README.md
|
|
@ -251,7 +251,7 @@ kind: Runner
|
|||
metadata:
|
||||
name: example-runner
|
||||
spec:
|
||||
repository: actions-runner-controller/actions-runner-controller
|
||||
repository: example/myrepo
|
||||
env: []
|
||||
```
|
||||
|
||||
|
|
@ -362,9 +362,11 @@ A `RunnerDeployment` or `RunnerSet` (see [stateful runners](#stateful-runners) f
|
|||
|
||||
#### Anti-Flapping Configuration
|
||||
|
||||
For both pull driven or webhook driven scaling an anti-flapping implementation is included, by default a runner won't be scaled down within 10 minutes of it having been scaled up. This delay is configurable by including the attribute `scaleDownDelaySecondsAfterScaleOut:` in a `RunnerDeployment` `spec:` (see snippet below).
|
||||
For both pull driven or webhook driven scaling an anti-flapping implementation is included, by default a runner won't be scaled down within 10 minutes of it having been scaled up. This delay is configurable by including the attribute `scaleDownDelaySecondsAfterScaleOut:` in a `HorizontalRunnerAutoscaler` kind's `spec:`.
|
||||
|
||||
This configuration has the final say on if a runner can be scaled down or not regardless of the chosen scaling method. Depending on your requirements, you may want to consider adjusting this.
|
||||
This configuration has the final say on if a runner can be scaled down or not regardless of the chosen scaling method. Depending on your requirements, you may want to consider adjusting this by setting the `scaleDownDelaySecondsAfterScaleOut:` attribute.
|
||||
|
||||
Below is a complete basic example with one of the pull driven scaling metrics.
|
||||
|
||||
```yaml
|
||||
apiVersion: actions.summerwind.dev/v1alpha1
|
||||
|
|
@ -372,11 +374,27 @@ kind: RunnerDeployment
|
|||
metadata:
|
||||
name: example-runner-deployment
|
||||
spec:
|
||||
# Runners in this RunnerDeployment won't be scaled down for 5 minutes instead of the default 10 minutes now
|
||||
scaleDownDelaySecondsAfterScaleOut: 300
|
||||
template:
|
||||
spec:
|
||||
repository: example/myrepo
|
||||
---
|
||||
apiVersion: actions.summerwind.dev/v1alpha1
|
||||
kind: HorizontalRunnerAutoscaler
|
||||
metadata:
|
||||
name: example-runner-deployment-autoscaler
|
||||
spec:
|
||||
# Runners in the targeted RunnerDeployment won't be scaled down for 5 minutes instead of the default 10 minutes now
|
||||
scaleDownDelaySecondsAfterScaleOut: 300
|
||||
scaleTargetRef:
|
||||
name: example-runner-deployment
|
||||
minReplicas: 1
|
||||
maxReplicas: 5
|
||||
metrics:
|
||||
- type: PercentageRunnersBusy
|
||||
scaleUpThreshold: '0.75'
|
||||
scaleDownThreshold: '0.25'
|
||||
scaleUpFactor: '2'
|
||||
scaleDownFactor: '0.5'
|
||||
```
|
||||
|
||||
#### Pull Driven Scaling
|
||||
|
|
@ -443,7 +461,7 @@ spec:
|
|||
metrics:
|
||||
- type: TotalNumberOfQueuedAndInProgressWorkflowRuns
|
||||
repositoryNames:
|
||||
- actions-runner-controller/actions-runner-controller
|
||||
- example/myrepo
|
||||
```
|
||||
|
||||
**PercentageRunnersBusy**
|
||||
|
|
|
|||
Loading…
Reference in New Issue