doc: Encourage everyone to explicitly set HRA scaleTargetRef kind (#1633)

Ref #1343
This commit is contained in:
Yusuke Kuoka
2022-08-14 13:04:03 +09:00
committed by GitHub
parent 06141b39b4
commit fe9164b025

View File

@@ -543,9 +543,10 @@ spec:
# for 5 minutes instead of the default 10 minutes now # for 5 minutes instead of the default 10 minutes now
scaleDownDelaySecondsAfterScaleOut: 300 scaleDownDelaySecondsAfterScaleOut: 300
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runner-deployment name: example-runner-deployment
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
minReplicas: 1 minReplicas: 1
maxReplicas: 5 maxReplicas: 5
metrics: metrics:
@@ -571,10 +572,10 @@ metadata:
name: example-runner-deployment-autoscaler name: example-runner-deployment-autoscaler
spec: spec:
scaleTargetRef: scaleTargetRef:
# Your RunnerDeployment Here type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runner-deployment name: example-runner-deployment
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
minReplicas: 1 minReplicas: 1
maxReplicas: 5 maxReplicas: 5
# Your chosen scaling metrics here # Your chosen scaling metrics here
@@ -615,9 +616,10 @@ metadata:
name: example-runner-deployment-autoscaler name: example-runner-deployment-autoscaler
spec: spec:
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runner-deployment name: example-runner-deployment
# IMPORTANT : If your HRA is targeting a RunnerSet you must specify the kind in the scaleTargetRef:, uncomment the below
#kind: RunnerSet
minReplicas: 1 minReplicas: 1
maxReplicas: 5 maxReplicas: 5
metrics: metrics:
@@ -650,9 +652,10 @@ metadata:
name: example-runner-deployment-autoscaler name: example-runner-deployment-autoscaler
spec: spec:
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runner-deployment name: example-runner-deployment
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
minReplicas: 1 minReplicas: 1
maxReplicas: 5 maxReplicas: 5
metrics: metrics:
@@ -671,9 +674,10 @@ metadata:
name: example-runner-deployment-autoscaler name: example-runner-deployment-autoscaler
spec: spec:
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runner-deployment name: example-runner-deployment
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
minReplicas: 1 minReplicas: 1
maxReplicas: 5 maxReplicas: 5
metrics: metrics:
@@ -700,9 +704,10 @@ More concretely, you can configure the targeted GitHub event types and the `N` i
kind: HorizontalRunnerAutoscaler kind: HorizontalRunnerAutoscaler
spec: spec:
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runners name: example-runners
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
scaleUpTriggers: scaleUpTriggers:
- githubEvent: - githubEvent:
checkRun: checkRun:
@@ -910,9 +915,10 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 10 maxReplicas: 10
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runners name: example-runners
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
scaleUpTriggers: scaleUpTriggers:
- githubEvent: - githubEvent:
workflowJob: {} workflowJob: {}
@@ -945,9 +951,10 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 10 maxReplicas: 10
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runners name: example-runners
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
scaleUpTriggers: scaleUpTriggers:
- githubEvent: - githubEvent:
checkRun: checkRun:
@@ -973,9 +980,10 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 10 maxReplicas: 10
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runners name: example-runners
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
scaleUpTriggers: scaleUpTriggers:
- githubEvent: - githubEvent:
checkRun: checkRun:
@@ -1005,9 +1013,10 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 10 maxReplicas: 10
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runners name: example-runners
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
scaleUpTriggers: scaleUpTriggers:
- githubEvent: - githubEvent:
pullRequest: pullRequest:
@@ -1035,9 +1044,10 @@ spec:
minReplicas: 1 minReplicas: 1
maxReplicas: 10 maxReplicas: 10
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runners name: example-runners
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
scaleUpTriggers: scaleUpTriggers:
- githubEvent: - githubEvent:
push: push:
@@ -1082,9 +1092,10 @@ metadata:
name: example-runner-deployment-autoscaler name: example-runner-deployment-autoscaler
spec: spec:
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runner-deployment name: example-runner-deployment
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
scheduledOverrides: scheduledOverrides:
# Override minReplicas to 100 only between 2021-06-01T00:00:00+09:00 and 2021-06-03T00:00:00+09:00 # Override minReplicas to 100 only between 2021-06-01T00:00:00+09:00 and 2021-06-03T00:00:00+09:00
- startTime: "2021-06-01T00:00:00+09:00" - startTime: "2021-06-01T00:00:00+09:00"
@@ -1104,9 +1115,10 @@ metadata:
name: example-runner-deployment-autoscaler name: example-runner-deployment-autoscaler
spec: spec:
scaleTargetRef: scaleTargetRef:
type: RunnerDeployment
# # In case the scale target is RunnerSet:
# kind: RunnerSet
name: example-runner-deployment name: example-runner-deployment
# Uncomment the below in case the target is not RunnerDeployment but RunnerSet
#kind: RunnerSet
scheduledOverrides: scheduledOverrides:
# Override minReplicas to 0 only between 0am sat to 0am mon # Override minReplicas to 0 only between 0am sat to 0am mon
- startTime: "2021-05-01T00:00:00+09:00" - startTime: "2021-05-01T00:00:00+09:00"