apiVersion: v1
kind: Secret
metadata:
  name: {{ include "ovirt-api-simulator.fullname" . }}-secret
type: Opaque
stringData:
  {{- if .Values.postgresql.enabled }}
  DATABASE_URL: "postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ include "ovirt-api-simulator.fullname" . }}-postgresql:5432/{{ .Values.postgresql.auth.database }}"
  {{- else }}
  DATABASE_URL: {{ required "databaseUrl is required when postgresql.enabled=false" .Values.databaseUrl | quote }}
  {{- end }}
  TICKET_SIGNING_KEY: {{ .Values.secrets.ticketSigningKey | quote }}
