diff --git a/helm-chart/ray-cluster/templates/raycluster-cluster.yaml b/helm-chart/ray-cluster/templates/raycluster-cluster.yaml index 8ef6a86..8eb31c5 100644 --- a/helm-chart/ray-cluster/templates/raycluster-cluster.yaml +++ b/helm-chart/ray-cluster/templates/raycluster-cluster.yaml @@ -66,6 +66,9 @@ spec: {{- toYaml . | nindent 10 }} {{- end }} spec: + {{ with .Values.head.runtimeClassName }} + runtimeClassName: {{ . | quote }} + {{- end }} {{- with .Values.head.initContainers }} initContainers: {{- toYaml . | nindent 8 }} @@ -192,6 +195,9 @@ spec: {{- toYaml . | nindent 10 }} {{- end }} spec: + {{ with .Values.worker.runtimeClassName }} + runtimeClassName: {{ . | quote }} + {{- end }} {{- with .Values.worker.initContainers }} initContainers: {{- toYaml . | nindent 8 }} diff --git a/helm-chart/ray-cluster/tests/raycluster_test.yaml b/helm-chart/ray-cluster/tests/raycluster_test.yaml index 4f931dc..b01228e 100644 --- a/helm-chart/ray-cluster/tests/raycluster_test.yaml +++ b/helm-chart/ray-cluster/tests/raycluster_test.yaml @@ -232,6 +232,15 @@ tests: path: spec.headGroupSpec.template.metadata.annotations.key2 value: value2 + - it: Should set runtimeClassName when `head.runtimeClassName` is set + set: + head: + runtimeClassName: test-runtime-class + asserts: + - equal: + path: spec.headGroupSpec.template.spec.runtimeClassName + value: test-runtime-class + - it: Should add init containers if `head.initContainers` is set set: head: @@ -879,6 +888,15 @@ tests: path: spec.workerGroupSpecs[?(@.groupName=="workergroup")].template.metadata.annotations.key2 value: value2 + - it: Should set runtimeClassName when `worker.runtimeClassName` is set + set: + worker: + runtimeClassName: test-runtime-class + asserts: + - equal: + path: spec.workerGroupSpecs[?(@.groupName=="workergroup")].template.spec.runtimeClassName + value: test-runtime-class + - it: Should add init containers if `worker.initContainers` is set set: worker: