apiVersion: v1
kind: Secret
metadata:
  name: logger-redis-creds
  labels:
    app: drycc-logger-redis
    heritage: drycc
  annotations:
    "helm.sh/hook": pre-install
data: 
  {{ if eq .Values.global.logger_redis_location "on-cluster"}}
  password: {{ randAlphaNum 32 | b64enc }}
  {{ else if eq .Values.global.logger_redis_location "off-cluster"}}
  addrs: {{ .Values.addrs | b64enc }}
  password: {{ .Values.password | b64enc }}
  {{ end }}
