mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 19:50:30 +00:00
`HRA.Spec.ScaleTargetRef.Kind` is added to denote that the scale-target is a RunnerSet.
It defaults to `RunnerDeployment` for backward compatibility.
```
apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
metadata:
name: myhra
spec:
scaleTargetRef:
kind: RunnerSet
name: myrunnerset
```
Ref #629
Ref #613
Ref #612
28 lines
656 B
YAML
28 lines
656 B
YAML
apiVersion: actions.summerwind.dev/v1alpha1
|
|
kind: HorizontalRunnerAutoscaler
|
|
metadata:
|
|
name: example-runnerset
|
|
spec:
|
|
scaleTargetRef:
|
|
kind: RunnerSet
|
|
name: example-runnerset
|
|
scaleUpTriggers:
|
|
- githubEvent:
|
|
checkRun:
|
|
types: ["created"]
|
|
status: "queued"
|
|
amount: 1
|
|
duration: "1m"
|
|
# RunnerSet doesn't support scale from/to zero yet
|
|
minReplicas: 1
|
|
maxReplicas: 5
|
|
metrics:
|
|
- type: PercentageRunnersBusy
|
|
scaleUpThreshold: '0.75'
|
|
scaleDownThreshold: '0.3'
|
|
scaleUpFactor: '2'
|
|
scaleDownFactor: '0.5'
|
|
- type: TotalNumberOfQueuedAndInProgressWorkflowRuns
|
|
repositoryNames:
|
|
- ${TEST_REPO}
|