Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Allow RayCluster Helm chart to specify different images for different worker groups #1352

Merged
merged 2 commits into from
Aug 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Feature] Allow RayCluster Helm chart to specify different images for…
… different worker for different worker groups
Darren221 committed Aug 19, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a163db1a2a47479dc9f8437b91d858bca86c569b
19 changes: 17 additions & 2 deletions helm-chart/ray-cluster/templates/raycluster-cluster.yaml
Original file line number Diff line number Diff line change
@@ -48,8 +48,13 @@ spec:
containers:
- volumeMounts: {{- toYaml .Values.head.volumeMounts | nindent 12 }}
name: ray-head
{{- if .Values.head.image.repository }}
image: {{ .Values.head.image.repository }}:{{ .Values.head.image.tag }}
imagePullPolicy: {{ .Values.head.image.pullPolicy }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will happen if pullPolicy is not defined?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImagePullPolicy is an optional field for Pod, and the default value is here.

Copy link
Contributor Author

@Darren221 Darren221 Aug 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To find out the difference between Pod and this PR regarding the imagePullPolicy, two test cases are shown below with different values for the tag of the image.
In this PR, both the repository and tag must be provided when specifying the image section.

Regarding the imagePullPolicy:
if it's left unspecified and the tag isn't set to "latest", the default becomes "IfNotPresent". (As shown in the figure below)

values.yaml (tag: not latest)
Screenshot 2023-08-22 at 15 19 47
Screenshot 2023-08-22 at 15 20 56

However, if the tag is "latest" and imagePullPolicy is not set, the default is "Always". (As shown in the figure below)

values.yaml (tag: latest)
Screenshot 2023-08-22 at 15 27 24
Screenshot 2023-08-22 at 15 24 47

{{- else }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- end }}
resources: {{- toYaml .Values.head.resources | nindent 14 }}
securityContext:
{{- toYaml .Values.head.securityContext | nindent 14 }}
@@ -120,8 +125,13 @@ spec:
containers:
- volumeMounts: {{- toYaml $values.volumeMounts | nindent 12 }}
name: ray-worker
image: {{ $.Values.image.repository }}:{{ $.Values.image.tag }}
imagePullPolicy: {{ $.Values.image.pullPolicy }}
{{- if $values.image.repository }}
image: {{ $values.image.repository }}:{{ $values.image.tag }}
imagePullPolicy: {{ $values.image.pullPolicy }}
{{- else }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- end }}
resources: {{- toYaml $values.resources | nindent 14 }}
securityContext:
{{- toYaml $values.securityContext | nindent 14 }}
@@ -190,8 +200,13 @@ spec:
containers:
- volumeMounts: {{- toYaml .Values.worker.volumeMounts | nindent 12 }}
name: ray-worker
{{- if .Values.worker.image.repository }}
image: {{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag }}
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
{{- else }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- end }}
resources: {{- toYaml .Values.worker.resources | nindent 14 }}
securityContext:
{{- toYaml .Values.worker.securityContext | nindent 14 }}