Skip to content

Commit 9d46862

Browse files
authored
[Helm] Add gcsFaultToleranceOptions in RayCluster chart (#3881)
* [Helm] Add gcsFaultToleranceOptions in RayCluster chart Signed-off-by: win5923 <[email protected]> * Reslove comments Signed-off-by: win5923 <[email protected]> --------- Signed-off-by: win5923 <[email protected]>
1 parent 8ad2c1b commit 9d46862

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

helm-chart/ray-cluster/templates/raycluster-cluster.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,21 @@ spec:
2020
autoscalerOptions:
2121
{{- toYaml . | nindent 4 }}
2222
{{- end }}
23+
{{- if .Values.gcsFaultTolerance.enabled }}
24+
gcsFaultToleranceOptions:
25+
redisAddress: {{ .Values.gcsFaultTolerance.redisAddress | quote }}
26+
{{- with .Values.gcsFaultTolerance.externalStorageNamespace }}
27+
externalStorageNamespace: {{ . | quote }}
28+
{{- end }}
29+
{{- with .Values.gcsFaultTolerance.redisPassword }}
30+
redisPassword:
31+
{{- toYaml . | nindent 6 }}
32+
{{- end }}
33+
{{- with .Values.gcsFaultTolerance.redisUsername }}
34+
redisUsername:
35+
{{- toYaml . | nindent 6 }}
36+
{{- end }}
37+
{{- end }}
2338
headGroupSpec:
2439
{{- with .Values.head.headService }}
2540
headService:

helm-chart/ray-cluster/tests/raycluster_test.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,33 @@ tests:
9797
seccompProfile:
9898
type: RuntimeDefault
9999

100+
- it: Should add GCS fault tolerance options when `gcsFaultTolerance.enabled` is `true`
101+
set:
102+
gcsFaultTolerance:
103+
enabled: true
104+
redisAddress: "test-redis:6379"
105+
externalStorageNamespace: "test-gcs-namespace"
106+
redisPassword:
107+
valueFrom:
108+
secretKeyRef:
109+
name: redis-secret
110+
key: password
111+
redisUsername:
112+
value: "test-user"
113+
asserts:
114+
- equal:
115+
path: spec.gcsFaultToleranceOptions
116+
value:
117+
redisAddress: "test-redis:6379"
118+
externalStorageNamespace: "test-gcs-namespace"
119+
redisPassword:
120+
valueFrom:
121+
secretKeyRef:
122+
name: redis-secret
123+
key: password
124+
redisUsername:
125+
value: "test-user"
126+
100127
# ===========================================================================
101128
# Test Head Group
102129
# ===========================================================================

helm-chart/ray-cluster/values.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,32 @@ fullnameOverride: ""
1616
imagePullSecrets: []
1717
# - name: an-existing-secret
1818

19+
# gcsFaultTolerance specifies configuration for GCS fault tolerance.
20+
# See https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/kuberay-gcs-ft.html#kuberay-gcs-ft
21+
# for more details.
22+
gcsFaultTolerance:
23+
enabled: false
24+
# In most cases, you don't need to set `externalStorageNamespace` because KubeRay will
25+
# automatically set it to the UID of RayCluster. Only modify this annotation if you fully understand
26+
# the behaviors of the Ray GCS FT and RayService to avoid misconfiguration.
27+
# externalStorageNamespace: "my-raycluster-storage"
28+
# redisAddress: "redis:6379"
29+
# redisPassword:
30+
# Reference to a secret key containing the Redis password
31+
# Secret must be manually created in the namespace
32+
# valueFrom:
33+
# secretKeyRef:
34+
# name: redis-password-secret
35+
# key: password
36+
# redisUsername:
37+
# Reference to a secret key containing the Redis username
38+
# Secret must be manually created in the namespace
39+
# valueFrom:
40+
# secretKeyRef:
41+
# name: redis-username-secret
42+
# key: username
43+
44+
1945
# common defined values shared between the head and worker
2046
common:
2147
# containerEnv specifies environment variables for the Ray head and worker containers.

0 commit comments

Comments
 (0)