Skip to content

Commit 828afba

Browse files
authored
Allow configuration of restartPolicy (#2197)
1 parent 41c9e91 commit 828afba

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

helm-chart/ray-cluster/templates/raycluster-cluster.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
{{- if .Values.head.serviceAccountName }}
4343
serviceAccountName: {{ .Values.head.serviceAccountName }}
4444
{{- end }}
45+
{{- if .Values.head.restartPolicy }}
46+
restartPolicy: {{ .Values.head.restartPolicy }}
47+
{{- end }}
4548
{{- if .Values.head.initContainers }}
4649
initContainers: {{- toYaml .Values.head.initContainers | nindent 10 }}
4750
{{- end }}
@@ -136,6 +139,9 @@ spec:
136139
{{- if $values.serviceAccountName }}
137140
serviceAccountName: {{ $values.serviceAccountName }}
138141
{{- end }}
142+
{{- if $values.restartPolicy }}
143+
restartPolicy: {{ $values.restartPolicy }}
144+
{{- end }}
139145
{{- if $values.initContainers }}
140146
initContainers: {{- toYaml $values.initContainers | nindent 10 }}
141147
{{- end }}
@@ -228,6 +234,9 @@ spec:
228234
{{- if .Values.worker.serviceAccountName }}
229235
serviceAccountName: {{ .Values.worker.serviceAccountName }}
230236
{{- end }}
237+
{{- if .Values.worker.restartPolicy }}
238+
restartPolicy: {{ .Values.worker.restartPolicy }}
239+
{{- end }}
231240
{{- if .Values.worker.initContainers }}
232241
initContainers: {{- toYaml .Values.worker.initContainers | nindent 10 }}
233242
{{- end }}

helm-chart/ray-cluster/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ head:
5656
# Note: From KubeRay v0.6.0, users need to create the ServiceAccount by themselves if they specify the `serviceAccountName`
5757
# in the headGroupSpec. See https://github.com/ray-project/kuberay/pull/1128 for more details.
5858
serviceAccountName: ""
59+
restartPolicy: ""
5960
rayStartParams:
6061
dashboard-host: '0.0.0.0'
6162
# containerEnv specifies environment variables for the Ray container,
@@ -126,6 +127,7 @@ worker:
126127
maxReplicas: 3
127128
labels: {}
128129
serviceAccountName: ""
130+
restartPolicy: ""
129131
rayStartParams: {}
130132
# containerEnv specifies environment variables for the Ray container,
131133
# Follows standard K8s container env schema.
@@ -189,6 +191,7 @@ additionalWorkerGroups:
189191
maxReplicas: 3
190192
labels: {}
191193
serviceAccountName: ""
194+
restartPolicy: ""
192195
rayStartParams: {}
193196
# containerEnv specifies environment variables for the Ray container,
194197
# Follows standard K8s container env schema.

0 commit comments

Comments
 (0)