Skip to content

Commit

Permalink
[Feature] Add service account section in helm chart (ray-project#969)
Browse files Browse the repository at this point in the history
Add service account section in helm chart
  • Loading branch information
ducviet00 authored Mar 21, 2023
1 parent 7416d19 commit cd643dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions helm-chart/ray-cluster/templates/raycluster-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ spec:
template:
spec:
imagePullSecrets: {{- toYaml .Values.imagePullSecrets | nindent 10 }}
{{- if .Values.head.serviceAccountName }}
serviceAccountName: {{ .Values.head.serviceAccountName }}
{{- end }}
containers:
- volumeMounts: {{- toYaml .Values.head.volumeMounts | nindent 12 }}
name: ray-head
Expand Down Expand Up @@ -100,6 +103,9 @@ spec:
command: ['sh', '-c', "until nslookup $FQ_RAY_IP; do echo waiting for K8s Service $FQ_RAY_IP; sleep 2; done"]
securityContext:
{{- toYaml $values.initContainerSecurityContext | nindent 14 }}
{{- if $values.serviceAccountName }}
serviceAccountName: {{ $values.serviceAccountName }}
{{- end }}
containers:
- volumeMounts: {{- toYaml $values.volumeMounts | nindent 12 }}
name: ray-worker
Expand Down Expand Up @@ -166,6 +172,9 @@ spec:
command: ['sh', '-c', "until nslookup $FQ_RAY_IP; do echo waiting for K8s Service $FQ_RAY_IP; sleep 2; done"]
securityContext:
{{- toYaml .Values.worker.initContainerSecurityContext | nindent 14 }}
{{- if .Values.worker.serviceAccountName }}
serviceAccountName: {{ .Values.worker.serviceAccountName }}
{{- end }}
containers:
- volumeMounts: {{- toYaml .Values.worker.volumeMounts | nindent 12 }}
name: ray-worker
Expand Down
3 changes: 3 additions & 0 deletions helm-chart/ray-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ head:
# cpu: "500m"
# memory: "512Mi"
labels: {}
serviceAccountName: ""
rayStartParams:
dashboard-host: '0.0.0.0'
block: 'true'
Expand Down Expand Up @@ -102,6 +103,7 @@ worker:
groupName: workergroup
replicas: 1
labels: {}
serviceAccountName: ""
rayStartParams:
block: 'true'
initContainerImage: 'busybox:1.28' # Enable users to specify the image for init container. Users can pull the busybox image from their private repositories.
Expand Down Expand Up @@ -165,6 +167,7 @@ additionalWorkerGroups:
minReplicas: 1
maxReplicas: 3
labels: {}
serviceAccountName: ""
rayStartParams:
block: 'true'
initContainerImage: 'busybox:1.28' # Enable users to specify the image for init container. Users can pull the busybox image from their private repositories.
Expand Down

0 comments on commit cd643dc

Please sign in to comment.