Skip to content

Commit

Permalink
redis password secret (ray-project#950)
Browse files Browse the repository at this point in the history
Read Redis password from Kubernetes Secret
  • Loading branch information
kevin85421 authored Mar 9, 2023
1 parent db047a6 commit 04341d6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion ray-operator/config/samples/ray-cluster.external-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ spec:
configMap:
name: redis-config
---
# Redis password
apiVersion: v1
kind: Secret
metadata:
name: redis-password-secret
type: Opaque
data:
# echo -n "5241590000000000" | base64
password: NTI0MTU5MDAwMDAwMDAwMA==
---
apiVersion: ray.io/v1alpha1
kind: RayCluster
metadata:
Expand All @@ -87,7 +97,7 @@ spec:
block: "true"
# redis-password should match "requirepass" in redis.conf in the ConfigMap above.
# Ray 2.3.0 changes the default redis password from "5241590000000000" to "".
redis-password: "5241590000000000"
redis-password: $RAY_REDIS_PASSWORD
#pod template
template:
spec:
Expand All @@ -98,6 +108,11 @@ spec:
# RAY_REDIS_ADDRESS can force ray to use external redis
- name: RAY_REDIS_ADDRESS
value: redis:6379
- name: RAY_REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-password-secret
key: password
ports:
- containerPort: 6379
name: redis
Expand Down

0 comments on commit 04341d6

Please sign in to comment.