{{- if and (not .Values.redis.enabled) .Values.databroker.storage.connectionString -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "pomerium.databroker.storage.secret" . }}
  labels:
    app.kubernetes.io/name: {{ template "pomerium.name" . }}
    helm.sh/chart: {{ template "pomerium.chart" . }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/instance: {{ .Release.Name }}
type: Opaque
data:
  DATABROKER_STORAGE_CONNECTION_STRING: {{ .Values.databroker.storage.connectionString | b64enc }}
{{- end -}}
