Skip to content

Commit 6bc34fa

Browse files
committed
fix bug
1 parent b7f87de commit 6bc34fa

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

addons/redis/dataprotection/backup.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ trap handle_exit EXIT
1515

1616
export PATH="$PATH:$DP_DATASAFED_BIN_PATH"
1717
export DATASAFED_BACKEND_BASE_PATH="$DP_BACKUP_BASE_PATH"
18-
<<<<<<< HEAD
1918

2019
function save_sentinel_acl() {
2120
if [ -z "$SENTINEL_POD_FQDN_LIST" ]; then

addons/redis/dataprotection/wait-for-cluster-ready.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
redis_cmd="redis-cli -h ${DP_DB_HOST} -p ${DP_DB_PORT}"
3+
redis_cmd="redis-cli $REDIS_CLI_TLS_CMD -h ${DP_DB_HOST} -p ${DP_DB_PORT}"
44
if [ -n "${REDIS_DEFAULT_PASSWORD}" ]; then
55
redis_cmd="${redis_cmd} -a ${REDIS_DEFAULT_PASSWORD}"
66
fi

addons/redis/redis-cluster-scripts/redis-cluster-manage.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,9 +946,9 @@ scale_out_redis_cluster_shard() {
946946
sync_acl_for_redis_cluster_shard() {
947947
echo "Sync ACL rules for redis cluster shard..."
948948
set +ex
949-
redis_base_cmd="redis-cli $REDIS_CLI_TLS_CMD -p $SERVICE_PORT -a $REDIS_DEFAULT_PASSWORD"
949+
redis_base_cmd="redis-cli $REDIS_CLI_TLS_CMD -a $REDIS_DEFAULT_PASSWORD"
950950
if [ -z "$REDIS_DEFAULT_PASSWORD" ]; then
951-
redis_base_cmd="redis-cli $REDIS_CLI_TLS_CMD -p $SERVICE_PORT"
951+
redis_base_cmd="redis-cli $REDIS_CLI_TLS_CMD"
952952
fi
953953
is_ok=false
954954
acl_list=""

addons/redis/templates/cmpd-redis-cluster.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,6 @@ spec:
353353
- name: SERVICE_PORT
354354
value: "6379"
355355
expression: {{ `{{if index . "REDIS_CLUSTER_HOST_NETWORK_PORT"}}{{.REDIS_CLUSTER_HOST_NETWORK_PORT}}{{else}}{{.SERVICE_PORT}}{{end}}` | toYaml }}
356-
- name: REDIS_METRICS_ADDR
357-
value: "redis://localhost:$(SERVICE_PORT)"
358-
expression: {{ `{{if eq (index . "TLS_ENABLED") "true"}}rediss://localhost: {{.SERVICE_PORT }}{{else}}redis://localhost:{{.SERVICE_PORT}}{{end}}` | toYaml }}
359356
- name: REDIS_CLI_TLS_CMD
360357
value: ""
361358
expression: {{ `{{if eq (index . "TLS_ENABLED") "true"}}--tls --insecure{{else }}{{end}}` | toYaml }}
@@ -610,6 +607,10 @@ spec:
610607
value: $(REDIS_METRICS_HTTP_PORT)
611608
- name: METRICS_SERVER_PORT
612609
value: $(REDIS_METRICS_SERVER_PORT)
610+
- name: REDIS_USER
611+
value: $(REDIS_DEFAULT_USER)
612+
- name: REDIS_PASSWORD
613+
value: $(REDIS_DEFAULT_PASSWORD)
613614
command:
614615
- "/bin/agamotto"
615616
- "--config=/opt/conf/metrics-config.yaml"

addons/redis/templates/cmpd-redis.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,10 @@ spec:
251251
- name: REDIS_METRICS_SERVER_PORT
252252
value: "8888"
253253
expression: {{ `{{if index . "REDIS_METRICS_HOST_NETWORK_SERVER_PORT"}}{{.REDIS_METRICS_HOST_NETWORK_SERVER_PORT}}{{else}}{{.REDIS_METRICS_SERVER_PORT}}{{end}}` | toYaml }}
254-
- name: REDIS_METRICS_ADDR
255-
value: "redis://localhost:$(SERVICE_PORT)"
256-
expression: {{ `{{if eq (index . "TLS_ENABLED") "true"}}rediss://localhost:{{.SERVICE_PORT}}{{else}}redis://localhost:{{.SERVICE_PORT}}{{end}}` | toYaml }}
254+
{{- end }}
257255
- name: REDIS_CLI_TLS_CMD
258256
value: ""
259257
expression: {{ `{{if eq (index . "TLS_ENABLED") "true"}}--tls --insecure{{else}}{{end}}` | toYaml }}
260-
{{- end }}
261258
## the component name of redis sentinel when redis sentinel is enabled, it's the fullname of redis-sentinel component
262259
- name: SENTINEL_COMPONENT_NAME
263260
valueFrom:
@@ -317,18 +314,14 @@ spec:
317314
- name: PHY_MEMORY
318315
valueFrom:
319316
resourceVarRef:
320-
<<<<<<< HEAD
321317
memoryLimit: Required
322-
=======
323-
memory: Required
324318
- name: TLS_ENABLED
325319
valueFrom:
326320
tlsVarRef:
327321
enabled: Optional
328322
optional: true
329323
- name: TLS_MOUNT_PATH
330324
value: {{ $.Values.tlsMountPath }}
331-
>>>>>>> ce73cc39 (chore: redis support tls (#2368))
332325
lifecycleActions:
333326
roleProbe:
334327
periodSeconds: 1
@@ -484,6 +477,10 @@ spec:
484477
value: $(REDIS_METRICS_HTTP_PORT)
485478
- name: METRICS_SERVER_PORT
486479
value: $(REDIS_METRICS_SERVER_PORT)
480+
- name: REDIS_USER
481+
value: $(REDIS_DEFAULT_USER)
482+
- name: REDIS_PASSWORD
483+
value: $(REDIS_DEFAULT_PASSWORD)
487484
command:
488485
- "/bin/agamotto"
489486
- "--config=/opt/conf/metrics-config.yaml"

0 commit comments

Comments
 (0)