Skip to content

Commit 79f8852

Browse files
committed
feat(charts): reuses the value from an existing secret and config
1 parent 2569406 commit 79f8852

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

charts/redis/templates/redis-secret-creds.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ metadata:
55
labels:
66
app: drycc-redis
77
heritage: drycc
8-
annotations:
9-
"helm.sh/hook": pre-install
108
data:
119
{{ if eq .Values.global.redisLocation "on-cluster"}}
1210
{{- $redisAddrs := (list ) }}
13-
{{ $redisNodeCount := .Values.replicas | int }}
11+
{{- $redisNodeCount := .Values.replicas | int }}
1412
{{- range $i := until $redisNodeCount }}
1513
{{- $redisAddrs = (append $redisAddrs (printf "drycc-redis-%d.drycc-redis.%s.svc.%s:6379" $i $.Release.Namespace $.Values.global.clusterDomain)) }}
1614
{{- end -}}
1715
addrs: {{ join "," $redisAddrs | b64enc }}
18-
password: {{ randAlphaNum 32 | b64enc }}
16+
password: {{ include "common.secrets.lookup" (dict "secret" "redis-creds" "key" "password" "defaultValue" (randAlphaNum 32) "context" $) }}
1917
{{ else if eq .Values.global.redisLocation "off-cluster"}}
2018
addrs: {{ .Values.addrs | b64enc }}
2119
password: {{ .Values.password | b64enc }}

0 commit comments

Comments
 (0)