{{- if and (not .Values.redis.enabled) (not .Values.externalRedis.existingSecret) (not .Values.redis.existingSecret)}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ printf "%s-%s" .Release.Name "externalredis"  }}
  labels:
    app.kubernetes.io/name: {{ include "airflow.name" . }}
    helm.sh/chart: {{ include "airflow.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque
data:
  redis-password: {{ .Values.externalRedis.password | b64enc | quote }}
{{- end }}
