{{- if and .Values.redis.enabled .Values.redis.auth.enabled .Values.redis.auth.password (not .Values.redis.auth.existingSecret) -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "colanode.fullname" . }}-redis
  labels:
    {{- include "colanode.labels" . | nindent 4 }}
type: Opaque
data:
  {{ .Values.redis.auth.secretKeys.redisPasswordKey }}: {{ .Values.redis.auth.password | b64enc | quote }}
{{- end }} 