Skip to content

Commit 64fe04f

Browse files
authored
Merge pull request #133 from holaplex/mpw/runners-antiaffinity
Mpw/runners antiaffinity
2 parents 37cfc52 + 8a3ef6a commit 64fe04f

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

charts/github-runners/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ type: application
1919
# to the chart and its templates, including the app version.
2020
# Versions are expected to follow Semantic Versioning (https://semver.org/)
2121

22-
version: 0.1.1
22+
version: 0.1.2
2323

2424
# This is the version number of the application being deployed. This version number should be
2525
# incremented each time you make changes to the application. Versions are not expected to
2626
# follow Semantic Versioning. They should reflect the version the application is using.
2727
# It is recommended to use it with quotes.
28-
appVersion: 0.1.1
28+
appVersion: 0.1.2
2929
sources:
3030
- https://github.com/holaplex/helm-charts

charts/github-runners/templates/runner.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,19 @@ kind: RunnerDeployment
88
metadata:
99
name: {{ $runner.name }}-{{ . }}
1010
namespace: actions-runner-system
11+
labels:
12+
arch: {{ . }}
13+
organization: {{ $organizationName }}
1114
spec:
15+
replicas: {{ $runner.replicas.min }}
1216
template:
1317
spec:
18+
repository: {{ $organizationName }}/{{ $runner.repository }}
19+
{{- with $runner.extraSpecs }}
20+
{{- range $key, $value := . }}
21+
{{ $key }}: {{ $value }}
22+
{{- end }}
23+
{{- end }}
1424
labels:
1525
- {{ . }}
1626
{{- if eq . "amd64" }}
@@ -19,11 +29,24 @@ spec:
1929
nodeSelector:
2030
kubernetes.io/arch: {{ . }}
2131
tolerations:
32+
{{- if $runner.extraTolerations }}
33+
{{ toYaml $runner.extraTolerations | indent 8 }}
34+
{{- end }}
2235
- key: "kubernetes.io/arch"
2336
operator: "Equal"
2437
value: {{ . }}
2538
effect: "NoSchedule"
26-
repository: {{ $organizationName }}/{{ $runner.repository }}
39+
topologySpreadConstraints:
40+
{{- if $runner.extraConstraints }}
41+
{{ toYaml $runner.extraConstraints | indent 8 }}
42+
{{- end }}
43+
- maxSkew: 1
44+
topologyKey: kubernetes.io/hostname
45+
whenUnsatisfiable: ScheduleAnyway
46+
labelSelector:
47+
matchLabels:
48+
arch: {{ . }}
49+
organization: {{ $organizationName }}
2750
---
2851
apiVersion: actions.summerwind.dev/v1alpha1
2952
kind: HorizontalRunnerAutoscaler

charts/github-runners/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ runners: []
55
# architectures:
66
# - arm64
77
# - amd64
8+
# extraTolerations: []
9+
# extraConstraints: []
10+
# extraSpecs: []
811
# replicas:
912
# min: 0
1013
# max: 5

0 commit comments

Comments
 (0)