Skip to content

Commit

Permalink
Update ray-operator/controllers/ray/common/pod.go
Browse files Browse the repository at this point in the history
Co-authored-by: Rueian <[email protected]>
Signed-off-by: Blocka <[email protected]>
  • Loading branch information
win5923 and rueian authored Jan 18, 2025
1 parent 5cadced commit 201a8d8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ray-operator/controllers/ray/common/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,9 @@ func configureGCSFaultTolerance(podTemplate *corev1.PodTemplateSpec, instance ra
// job can connect to Redis using the username.
if !utils.EnvVarExists(utils.REDIS_USERNAME, container.Env) {
// setting the REDIS_USERNAME env var from the params
redisUsernameEnv := corev1.EnvVar{Name: utils.REDIS_USERNAME}
if value, ok := instance.Spec.HeadGroupSpec.RayStartParams["redis-username"]; ok {
redisUsernameEnv.Value = value
container.Env = append(container.Env, corev1.EnvVar{Name: utils.REDIS_USERNAME, Value: value})
}
container.Env = append(container.Env, redisUsernameEnv)
}
// If users directly set the `redis-password` in `rayStartParams` instead of referring
// to a K8s secret, we need to set the `REDIS_PASSWORD` env var so that the Redis cleanup
Expand Down

0 comments on commit 201a8d8

Please sign in to comment.