{{- if .Values.config.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ .Values.config.name }}
  labels: {{- include "statehub.labels" . | nindent 4 }}
data:
  CORS_ORIGINS: {{ .Values.config.corsOrigins | quote }}
  SBOM_NEXUS_URL: {{ .Values.config.sbomNexusUrl | quote }}
  SBOM_NEXUS_READ_MODE: {{ .Values.config.sbomNexusReadMode | quote }}
  SBOM_NEXUS_WRITE_MODE: {{ .Values.config.sbomNexusWriteMode | quote }}
  # What this instance claims to be. Callers that need the authoritative hub
  # check this rather than assuming whatever answered is central.
  STATE_HUB_INSTANCE_ROLE: {{ .Values.config.instanceRole | quote }}
  STATE_HUB_INSTANCE_LABEL: {{ .Values.config.instanceLabel | quote }}
{{- end }}
