diff --git a/charts/github-runners/Chart.yaml b/charts/github-runners/Chart.yaml index 62150fe..be59782 100644 --- a/charts/github-runners/Chart.yaml +++ b/charts/github-runners/Chart.yaml @@ -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 diff --git a/charts/github-runners/templates/runner.yaml b/charts/github-runners/templates/runner.yaml index 0bf2adf..6bfc5ac 100644 --- a/charts/github-runners/templates/runner.yaml +++ b/charts/github-runners/templates/runner.yaml @@ -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" }} @@ -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 diff --git a/charts/github-runners/values.yaml b/charts/github-runners/values.yaml index 21906cd..44e001d 100644 --- a/charts/github-runners/values.yaml +++ b/charts/github-runners/values.yaml @@ -5,6 +5,9 @@ runners: [] # architectures: # - arm64 # - amd64 +# extraTolerations: [] +# extraConstraints: [] +# extraSpecs: [] # replicas: # min: 0 # max: 5