Skip to content

Commit 0bdba96

Browse files
authored
feat: add scheduledOverrides to HPA config (#23)
1 parent 527ec07 commit 0bdba96

File tree

4 files changed

+29
-14
lines changed

4 files changed

+29
-14
lines changed

.github/workflows/pr-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
steps:
1111
- name: Lint PR
12-
uses: aslafy-z/conventional-pr-title-action@master
12+
uses: aslafy-z/conventional-pr-title-action@v2.4.1
1313
with:
1414
preset: conventional-changelog-angular@^5.0.6
1515
env:

charts/github-actions-runners/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ apiVersion: v2
22
name: github-actions-runners
33
description: A Helm chart for provisioning Github Actions runners
44
type: application
5-
version: 0.2.2
5+
version: 0.3.0
66
maintainers:
77
- name: SweetOps

charts/github-actions-runners/templates/hpa.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{{- $minReplicas := $autoscaling.minReplicas | default $.Values.global.autoscaling.minReplicas }}
99
{{- $maxReplicas := $autoscaling.maxReplicas | default $.Values.global.autoscaling.maxReplicas }}
1010
{{- $scaleUpTriggers := $autoscaling.scaleUpTriggers | default $.Values.global.autoscaling.scaleUpTriggers }}
11+
{{- $scheduledOverrides := $autoscaling.scheduledOverrides | default $.Values.global.autoscaling.scheduledOverrides }}
1112
{{- $metrics := $autoscaling.metrics | default $.Values.global.autoscaling.metrics }}
1213
{{- $scaleDownDelaySecondsAfterScaleOut := $autoscaling.scaleDownDelaySecondsAfterScaleOut | default $.Values.global.autoscaling.scaleDownDelaySecondsAfterScaleOut }}
1314
{{- if $autoscalingEnabled }}
@@ -32,6 +33,10 @@ spec:
3233
metrics:
3334
{{- toYaml . | nindent 4 }}
3435
{{- end }}
36+
{{- with $scheduledOverrides }}
37+
scheduledOverrides:
38+
{{- toYaml . | nindent 4 }}
39+
{{- end }}
3540
{{- end }}
3641
{{- end }}
3742
{{- end }}

charts/github-actions-runners/values.yaml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ global:
3636
dockerdWithinRunnerContainer: true
3737
labels: []
3838

39-
env: []
39+
env:
40+
[]
4041
# - name: RUNNER_FEATURE_FLAG_EPHEMERAL
4142
# value: "true"
4243

@@ -45,12 +46,12 @@ global:
4546
maxReplicas: 3
4647
metrics: []
4748
scaleUpTriggers: []
49+
scheduledOverrides: []
4850
scaleDownDelaySecondsAfterScaleOut: 300
4951

50-
5152
runnerDeployments:
5253
- name: default
53-
enabled: true
54+
enabled: false
5455
replicaCount: 1
5556
image:
5657
repository: summerwind/actions-runner-dind
@@ -68,15 +69,17 @@ runnerDeployments:
6869

6970
podAnnotations: {}
7071

71-
securityContext: {}
72+
securityContext:
73+
{}
7274
# capabilities:
7375
# drop:
7476
# - ALL
7577
# readOnlyRootFilesystem: true
7678
# runAsNonRoot: true
7779
# runAsUser: 1000
7880

79-
resources: {}
81+
resources:
82+
{}
8083
# We usually recommend not to specify default resources and to leave this as a conscious
8184
# choice for the user. This also increases chances charts run on environments with little
8285
# resources, such as Minikube. If you do want to specify resources, uncomment the following
@@ -113,16 +116,23 @@ runnerDeployments:
113116

114117
affinity: {}
115118

116-
env: []
119+
env:
120+
[]
117121
# - name: RUNNER_FEATURE_FLAG_EPHEMERAL
118122
# value: "true"
119123

120124
autoscaling:
121125
enabled: false
122126
scaleUpTriggers:
123-
- githubEvent:
124-
checkRun:
125-
types: ["created"]
126-
status: "queued"
127-
amount: 1
128-
duration: "5m"
127+
- githubEvent:
128+
checkRun:
129+
types: ["created"]
130+
status: "queued"
131+
amount: 1
132+
duration: "5m"
133+
scheduledOverrides:
134+
- startTime: "2021-05-01T00:00:00+09:00"
135+
endTime: "2021-05-03T00:00:00+09:00"
136+
recurrenceRule:
137+
frequency: Weekly
138+
minReplicas: 1

0 commit comments

Comments
 (0)