Skip to content

Commit 24b35ff

Browse files
authored
fix(argo-cd): Same Secret name and key for all embedded redis options (argoproj#3238)
Signed-off-by: Marco Maurer <[email protected]>
1 parent 697a5bd commit 24b35ff

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

charts/argo-cd/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ appVersion: v2.14.9
33
kubeVersion: ">=1.25.0-0"
44
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
55
name: argo-cd
6-
version: 7.8.22
6+
version: 7.8.23
77
home: https://github.com/argoproj/argo-helm
88
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
99
sources:
@@ -26,5 +26,5 @@ annotations:
2626
fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
2727
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
2828
artifacthub.io/changes: |
29-
- kind: changed
30-
description: Bump argo-cd to v2.14.9
29+
- kind: fixed
30+
description: Secret for embedded Redis deployments now always uses the same name and key

charts/argo-cd/templates/_helpers.tpl

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,21 +295,23 @@ optional: true
295295
secretKeyRef of env variable REDIS_PASSWORD
296296
*/}}
297297
{{- define "argo-cd.redisPasswordSecretRef" -}}
298-
{{- if and .Values.redisSecretInit.enabled (not .Values.externalRedis.host) -}}
298+
{{- if .Values.externalRedis.host -}}
299+
{{- /* External Redis use case */ -}}
300+
{{- /* Secret is required when specifying existingSecret or a password, otherwise it is optional */ -}}
301+
name: {{ default "argocd-redis" .Values.externalRedis.existingSecret }}
302+
key: redis-password
303+
optional: {{ if or .Values.externalRedis.existingSecret .Values.externalRedis.password }}false{{ else }}true{{ end }}
304+
305+
{{- else if and .Values.redisSecretInit.enabled -}}
299306
{{- /* Default case where Secret is generated by the Job with Helm pre-install hooks */ -}}
300-
name: "argocd-redis" # hard-coded in Job command "argocd admin redis-initial-password"
307+
name: "argocd-redis" # hard-coded in Job command and embedded Redis deployments (standalone and redis-ha)
301308
key: auth
302309
optional: false # Secret is not optional in this case !
303-
{{- else if .Values.externalRedis.host -}}
304-
{{- /* External Redis use case */ -}}
305-
{{- /* Secret is required when specifying existingSecret, otherwise it is optional */ -}}
306-
name: {{ default (include "argo-cd.redis.fullname" .) .Values.externalRedis.existingSecret }}
307-
key: redis-password
308-
optional: {{ if .Values.externalRedis.existingSecret }}false{{ else }}true{{ end }}
310+
309311
{{- else -}}
310312
{{- /* All other use cases (e.g. disabled pre-install Job) */ -}}
311-
name: {{ include "argo-cd.redis.fullname" . }}
312-
key: redis-password
313+
name: "argocd-redis"
314+
key: auth
313315
optional: true
314316
{{- end -}}
315317
{{- end -}}

0 commit comments

Comments
 (0)