apiVersion: v1
kind: ConfigMap
metadata:
  name: excerpt-worker-docx-properties
data:
  config.yaml: |-
    {{- 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}}
      kafka:
        bootstrap: {{ .Values.kafka.url }}:{{ .Values.kafka.port }}
        ssl:
          enabled: {{ .Values.kafka.sslEnabled }}
          keystore-type: {{ .Values.kafka.sslCertType }}
          truststore-type: {{ .Values.kafka.sslCertType }}
          keystore-certificate: {{ .Values.kafka.sslUserCertificate }}
          keystore-key: {{ .Values.kafka.sslUserKey }}
          truststore-certificate: {{ .Values.kafka.sslClusterCertificate }}


    file-excerpt-ceph:
      http-endpoint: {{ .Values.fileExcerptCeph.httpEndpoint }}
      bucketName: {{ .Values.fileExcerptCeph.bucketName }}

    excerpt-templates-ceph:
      http-endpoint: {{ .Values.excerptTemplatesCeph.httpEndpoint }}
      bucketName: {{ .Values.excerptTemplatesCeph.bucketName }}
    
    s3:
      config:
        client: {{ .Values.s3.config.client | toYaml | nindent 10 }}
        options: {{ .Values.s3.config.options | toYaml | nindent 10 }}

    audit:
      kafka:
        bootstrap: {{ .Values.kafka.url }}:{{ .Values.kafka.port }}
        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 }}