Skip to content

Commit

Permalink
Merge pull request #133 from holaplex/mpw/runners-antiaffinity
Browse files Browse the repository at this point in the history
Mpw/runners antiaffinity
  • Loading branch information
mpwsh authored Jul 30, 2023
2 parents 37cfc52 + 8a3ef6a commit 64fe04f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/github-runners/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 0.1.1
version: 0.1.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.1.1
appVersion: 0.1.2
sources:
- https://github.com/holaplex/helm-charts
25 changes: 24 additions & 1 deletion charts/github-runners/templates/runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@ kind: RunnerDeployment
metadata:
name: {{ $runner.name }}-{{ . }}
namespace: actions-runner-system
labels:
arch: {{ . }}
organization: {{ $organizationName }}
spec:
replicas: {{ $runner.replicas.min }}
template:
spec:
repository: {{ $organizationName }}/{{ $runner.repository }}
{{- with $runner.extraSpecs }}
{{- range $key, $value := . }}
{{ $key }}: {{ $value }}
{{- end }}
{{- end }}
labels:
- {{ . }}
{{- if eq . "amd64" }}
Expand All @@ -19,11 +29,24 @@ spec:
nodeSelector:
kubernetes.io/arch: {{ . }}
tolerations:
{{- if $runner.extraTolerations }}
{{ toYaml $runner.extraTolerations | indent 8 }}
{{- end }}
- key: "kubernetes.io/arch"
operator: "Equal"
value: {{ . }}
effect: "NoSchedule"
repository: {{ $organizationName }}/{{ $runner.repository }}
topologySpreadConstraints:
{{- if $runner.extraConstraints }}
{{ toYaml $runner.extraConstraints | indent 8 }}
{{- end }}
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
arch: {{ . }}
organization: {{ $organizationName }}
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
Expand Down
3 changes: 3 additions & 0 deletions charts/github-runners/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ runners: []
# architectures:
# - arm64
# - amd64
# extraTolerations: []
# extraConstraints: []
# extraSpecs: []
# replicas:
# min: 0
# max: 5

0 comments on commit 64fe04f

Please sign in to comment.