apiVersion: v1
kind: ConfigMap
metadata:
  name: process-history-service-api-properties
data:
  config.yaml: |-
    server.max-http-header-size: 32KB
    {{- if eq .Values.deployProfile "dev" }}
    management.endpoints.web.exposure.include: '*'
    {{- else }}
    management.endpoints.web.exposure.include: 'health, prometheus'
    {{- end }}

    data-platform:
      datasource:
        url: jdbc:postgresql://{{.Values.db.url}}:{{.Values.db.port}}/{{.Values.db.name}}?ApplicationName={{ .Chart.Name }}
        connection-timeout: {{.Values.db.connectionTimeout}}
    
    audit:
      kafka:
        bootstrap: {{ .Values.kafka.service }}
        topic: {{ .Values.audit.kafka.topic }}
        schema-registry-url: {{ .Values.audit.kafka.schemaRegistryUrl }}
        ssl:
          enabled: {{ .Values.kafka.sslEnabled }}
          keystore-certificate: {{ .Values.kafka.sslUserCertificate }}
          keystore-key: {{ .Values.kafka.sslUserKey }}
          truststore-certificate: {{ .Values.kafka.sslClusterCertificate }}
