Set restart policy on the runner pod to Never if restartPolicy is not set in template (#2787)

This commit is contained in:
Nikola Jokic
2023-09-07 13:39:08 +02:00
committed by GitHub
parent 64eafb58b6
commit 10d79342d7
2 changed files with 50 additions and 0 deletions

View File

@@ -106,6 +106,9 @@ spec:
{{ $key }}: {{ $val | toYaml | nindent 8 }}
{{- end }}
{{- end }}
{{- if not .Values.template.spec.restartPolicy }}
restartPolicy: Never
{{- end }}
{{- $containerMode := .Values.containerMode }}
{{- if eq $containerMode.type "kubernetes" }}
serviceAccountName: {{ default (include "gha-runner-scale-set.kubeModeServiceAccountName" .) .Values.template.spec.serviceAccountName }}