diff --git a/config/redis/redis-cluster-values.yml b/config/redis/redis-cluster-values.yml new file mode 100644 index 0000000..ae42cf2 --- /dev/null +++ b/config/redis/redis-cluster-values.yml @@ -0,0 +1,13 @@ +global: + redis: + password: "" +replica: + replicaCount: 3 + persistence: + enabled: true + size: 50Mi +sentinel: + enabled: true + persistence: + enabled: true + size: 20Mi \ No newline at end of file diff --git a/config/redis/sentinel_tunnel.remote.config.json b/config/redis/sentinel_tunnel.remote.config.json index 44825f4..93616a8 100644 --- a/config/redis/sentinel_tunnel.remote.config.json +++ b/config/redis/sentinel_tunnel.remote.config.json @@ -1,8 +1,8 @@ { "Sentinels_addresses_list":[ - "redis-node-0:26379", - "redis-node-1:26379", - "redis-node-2:26379" + "redis-node-0.redis-headless.e66ac2-dev.svc.cluster.local:26379", + "redis-node-1.redis-headless.e66ac2-dev.svc.cluster.local:26379", + "redis-node-2.redis-headless.e66ac2-dev.svc.cluster.local:26379" ], "Databases":[ { diff --git a/config/redis/values.yml b/config/redis/values.yml index 802e317..928c7a5 100644 --- a/config/redis/values.yml +++ b/config/redis/values.yml @@ -193,7 +193,7 @@ securityContext: # value: "10000" ## Use password authentication -usePassword: true +usePassword: false ## Redis password (both master and slave) ## Defaults to a random 10-character alphanumeric string if not set and usePassword is true ## ref: https://github.com/bitnami/bitnami-docker-redis#setting-the-server-password-on-first-run diff --git a/openshift/scripts/deploy-redis-sentinel.sh b/openshift/scripts/deploy-redis-sentinel.sh index 25770d7..61203c1 100644 --- a/openshift/scripts/deploy-redis-sentinel.sh +++ b/openshift/scripts/deploy-redis-sentinel.sh @@ -23,6 +23,7 @@ cat < values.yaml global: redis: password: "$SECRET_REDIS_PASSWORD" + requirepass "$SECRET_REDIS_PASSWORD" replica: replicaCount: $REDIS_REPLICAS persistence: @@ -39,7 +40,7 @@ EOF if helm list -q | grep -q "^$REDIS_NAME$"; then echo "Helm deployment found. Updating..." - helm_upgrade_response=$(helm upgrade $REDIS_NAME $REDIS_HELM_CHART --reuse-values -f values.yaml) + helm_upgrade_response=$(helm upgrade $REDIS_NAME $REDIS_HELM_CHART --set auth.password="$SECRET_REDIS_PASSWORD" --reuse-values -f values.yaml) # Output the response for debugging purposes echo "1. $helm_upgrade_response"