{{- if and .Values.secret.create (not .Values.secret.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ include "proxmox-api-simulator.fullname" . }}
  labels:
    {{- include "proxmox-api-simulator.labels" . | nindent 4 }}
type: Opaque
stringData:
  DATABASE_URL: {{ include "proxmox-api-simulator.databaseUrl" . | quote }}
  TICKET_SIGNING_KEY: {{ required "secret.ticketSigningKey is required when secret.create=true" .Values.secret.ticketSigningKey | quote }}
{{- end }}
