Created
June 28, 2022 23:15
-
-
Save joshjohanning/4c4ccd3998d81552be940b07649d609a to your computer and use it in GitHub Desktop.
runner.yaml for actions-runner-controller with org runners and metric-based scaling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: actions.summerwind.dev/v1alpha1 | |
kind: RunnerDeployment | |
metadata: | |
name: joshjohanning-org-runner | |
spec: | |
replicas: 1 | |
template: | |
spec: | |
organization: joshjohanning-org | |
group: k8s-group | |
labels: | |
- k8s-runner | |
--- | |
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: joshjohanning-org-runner | |
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet | |
#kind: RunnerSet | |
minReplicas: 3 | |
maxReplicas: 5 | |
metrics: | |
- type: PercentageRunnersBusy | |
scaleUpThreshold: '0.75' # The percentage of busy runners at which the number of desired runners are re-evaluated to scale up | |
scaleDownThreshold: '0.3' # The percentage of busy runners at which the number of desired runners are re-evaluated to scale down | |
scaleUpFactor: '1.4' # The scale up multiplier factor applied to desired count | |
scaleDownFactor: '0.7' # The scale down multiplier factor applied to desired count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment