diff --git a/charts/gha-runner-scale-set/templates/_helpers.tpl b/charts/gha-runner-scale-set/templates/_helpers.tpl index bd71ed64c9..4f693b1f5d 100644 --- a/charts/gha-runner-scale-set/templates/_helpers.tpl +++ b/charts/gha-runner-scale-set/templates/_helpers.tpl @@ -106,6 +106,9 @@ env: value: "123" securityContext: privileged: true +{{- if (ge (.Capabilities.KubeVersion.Minor | int) 29) }} +restartPolicy: Always +{{- end }} volumeMounts: - name: work mountPath: /home/runner/_work diff --git a/charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml b/charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml index 39ebfef800..fed80336d4 100644 --- a/charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml +++ b/charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml @@ -127,6 +127,10 @@ spec: - name: init-dind-externals {{- include "gha-runner-scale-set.dind-init-container" . | nindent 8 }} {{- end }} + {{- if (ge (.Capabilities.KubeVersion.Minor | int) 29) }} + - name: dind + {{- include "gha-runner-scale-set.dind-container" . | nindent 8 }} + {{- end }} {{- with .Values.template.spec.initContainers }} {{- toYaml . | nindent 6 }} {{- end }} @@ -135,8 +139,10 @@ spec: {{- if eq $containerMode.type "dind" }} - name: runner {{- include "gha-runner-scale-set.dind-runner-container" . | nindent 8 }} + {{- if not (ge (.Capabilities.KubeVersion.Minor | int) 29) }} - name: dind {{- include "gha-runner-scale-set.dind-container" . | nindent 8 }} + {{- end }} {{- include "gha-runner-scale-set.non-runner-non-dind-containers" . | nindent 6 }} {{- else if eq $containerMode.type "kubernetes" }} - name: runner