Skip to content

Commit 6f3b060

Browse files
ghkdwlgns612jihun-hwang_ktdev
authored andcommitted
fix code review
1 parent 67ddf0c commit 6f3b060

2 files changed

Lines changed: 36 additions & 2 deletions

File tree

helm/templates/ray-cluster.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
{{- include "chart.engineLabels" . | nindent 10 }}
2727
spec:
2828
terminationGracePeriodSeconds: 0
29-
{{- if hasKey $modelSpec "serviceAccountName" }}
29+
{{- if $modelSpec.serviceAccountName }}
3030
serviceAccountName: {{ $modelSpec.serviceAccountName }}
3131
{{- end }}
3232
{{- with .Values.servingEngineSpec.securityContext }}
@@ -283,7 +283,7 @@ spec:
283283
helm-release-name: {{ .Release.Name }}
284284
{{- include "chart.engineLabels" . | nindent 12 }}
285285
spec:
286-
{{- if hasKey $modelSpec "serviceAccountName" }}
286+
{{- if $modelSpec.serviceAccountName }}
287287
serviceAccountName: {{ $modelSpec.serviceAccountName }}
288288
{{- end }}
289289
{{- with .Values.servingEngineSpec.securityContext }}

helm/tests/ray-cluster_test.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,3 +525,37 @@ tests:
525525
- documentIndex: 0
526526
isNull:
527527
path: spec.workerGroupSpecs[0].template.spec.serviceAccountName
528+
529+
- it: should not set serviceAccountName when set to empty string
530+
release:
531+
name: vllm
532+
set:
533+
servingEngineSpec:
534+
enableEngine: true
535+
modelSpec:
536+
- name: "test-model"
537+
repository: "vllm/vllm-openai"
538+
tag: "latest"
539+
modelURL: "facebook/opt-125m"
540+
replicaCount: 1
541+
requestCPU: 1
542+
requestMemory: "1Gi"
543+
requestGPU: 1
544+
serviceAccountName: ""
545+
raySpec:
546+
enabled: true
547+
headNode:
548+
requestCPU: 1
549+
requestMemory: "1Gi"
550+
requestGPU: 1
551+
asserts:
552+
- documentIndex: 0
553+
equal:
554+
path: kind
555+
value: RayCluster
556+
- documentIndex: 0
557+
isNull:
558+
path: spec.headGroupSpec.template.spec.serviceAccountName
559+
- documentIndex: 0
560+
isNull:
561+
path: spec.workerGroupSpecs[0].template.spec.serviceAccountName

0 commit comments

Comments
 (0)