apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "postiz.fullname" . }}-config
  labels:
    {{- include "postiz.labels" . | nindent 4 }}
data:
  {{- range $key, $value := .Values.env }}
  {{ $key }}: {{ $value | quote }}
  {{- end }}
  {{- if or .Values.temporal.enabled .Values.temporal.address }}
  TEMPORAL_ADDRESS: {{ default (printf "%s-temporal:7233" (include "postiz.fullname" .)) .Values.temporal.address | quote }}
  TEMPORAL_NAMESPACE: {{ .Values.temporal.namespace | default "default" | quote }}
  TEMPORAL_TLS: {{ .Values.temporal.tls | toString | quote }}
  {{- end }}
