{{- if .Values.temporal.enabled }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "postiz.fullname" . }}-temporal-secret
  labels:
    {{- include "postiz.labels" . | nindent 4 }}
type: Opaque
data:
  POSTGRES_PWD: {{ required "temporal.postgresql.password is required when temporal.enabled=true" .Values.temporal.postgresql.password | b64enc | quote }}
  {{- if .Values.temporal.apiKey }}
  TEMPORAL_API_KEY: {{ .Values.temporal.apiKey | b64enc | quote }}
  {{- end }}
{{- end }}
