apiVersion: v1
kind: Secret
metadata:
  name: logger-redis-creds
  labels:
    app: deis-logger-redis
    heritage: deis
  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"}}
  db: {{ .Values.db | b64enc }}
  password: {{ .Values.password | b64enc }}
  host: {{ .Values.host | b64enc }}
  port: {{ .Values.port | b64enc }}{{ end }}
