argocd-helm/charts/argo-cd/templates/argocd-configs/externalredis-secret.yaml
Petr Drastil 67659d4db0
feat(argo-cd): Add username support for external redis (#1478)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
Signed-off-by: Eugene Lugovtsov <34510252+EugeneLugovtsov@users.noreply.github.com>

Co-authored-by: Eugene Lugovtsov <34510252+EugeneLugovtsov@users.noreply.github.com>
2022-09-21 20:21:12 +02:00

22 lines
673 B
YAML

{{- if and (or .Values.externalRedis.username .Values.externalRedis.password) (not .Values.externalRedis.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "argo-cd.redis.fullname" . }}
labels:
{{- include "argo-cd.labels" (dict "context" $) | nindent 4 }}
{{- with .Values.externalRedis.secretAnnotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
type: Opaque
data:
{{- with .Values.externalRedis.username }}
redis-username: {{ . | b64enc }}
{{- end }}
{{- with .Values.externalRedis.password }}
redis-password: {{ . | b64enc }}
{{- end }}
{{- end }}