Skip to content

Commit

Permalink
Add common containerEnv section to Helm Chart (#1932)
Browse files Browse the repository at this point in the history
  • Loading branch information
chainlink authored Feb 21, 2024
1 parent 0074129 commit e330c03
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
21 changes: 18 additions & 3 deletions helm-chart/ray-cluster/templates/raycluster-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ spec:
securityContext:
{{- toYaml .Values.head.securityContext | nindent 14 }}
env:
{{- toYaml .Values.head.containerEnv | nindent 14}}
{{- with .Values.common.containerEnv }}
{{- toYaml . | nindent 14 }}
{{- end }}
{{- with .Values.head.containerEnv }}
{{- toYaml . | nindent 14 }}
{{- end }}
{{- with .Values.head.envFrom }}
envFrom: {{- toYaml . | nindent 14}}
{{- end }}
Expand Down Expand Up @@ -142,7 +147,12 @@ spec:
securityContext:
{{- toYaml $values.securityContext | nindent 14 }}
env:
{{- toYaml $values.containerEnv | nindent 14}}
{{- with $.Values.common.containerEnv }}
{{- toYaml . | nindent 14 }}
{{- end }}
{{- with $values.containerEnv }}
{{- toYaml . | nindent 14}}
{{- end }}
{{- if $values.envFrom }}
envFrom: {{- toYaml $values.envFrom | nindent 14 }}
{{- end }}
Expand Down Expand Up @@ -221,7 +231,12 @@ spec:
securityContext:
{{- toYaml .Values.worker.securityContext | nindent 14 }}
env:
{{- toYaml .Values.worker.containerEnv | nindent 14}}
{{- with .Values.common.containerEnv }}
{{- toYaml . | nindent 14 }}
{{- end }}
{{- with .Values.worker.containerEnv }}
{{- toYaml . | nindent 14}}
{{- end }}
{{- with .Values.worker.envFrom }}
envFrom: {{- toYaml . | nindent 14}}
{{- end }}
Expand Down
7 changes: 7 additions & 0 deletions helm-chart/ray-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ fullnameOverride: ""
imagePullSecrets: []
# - name: an-existing-secret

# common defined values shared between the head and worker
common:
# containerEnv specifies environment variables for the Ray head and worker containers.
# Follows standard K8s container env schema.
containerEnv: {}
# - name: BLAH
# value: VAL
head:
# rayVersion determines the autoscaler's image version.
# It should match the Ray version in the image of the containers.
Expand Down

0 comments on commit e330c03

Please sign in to comment.