apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "orchard.fullname" . }}-config
  labels:
    {{- include "orchard.labels" . | nindent 4 }}
data:
  config.yaml: |
    server:
      host: {{ .Values.orchard.server.host | quote }}
      port: {{ .Values.orchard.server.port }}
    database:
      host: {{ include "orchard.postgresql.host" . | quote }}
      port: {{ .Values.orchard.database.port }}
      user: {{ .Values.orchard.database.user | default .Values.postgresql.auth.username | quote }}
      dbname: {{ .Values.orchard.database.dbname | default .Values.postgresql.auth.database | quote }}
      sslmode: {{ .Values.orchard.database.sslmode | quote }}
    s3:
      endpoint: {{ include "orchard.minio.host" . | quote }}
      region: {{ .Values.orchard.s3.region | quote }}
      bucket: {{ .Values.orchard.s3.bucket | quote }}
      use_path_style: {{ .Values.orchard.s3.usePathStyle }}
