apiVersion: v1
kind: ConfigMap
metadata:
  name: api-cm-config
data:
  # property-like keys; each key maps to a simple value
  default.toml: |
    {{ range .Values.api.additionalConfig }}
    {{ . }}
    {{ end }}

    [ingress]
      endpoint = "direktiv-kube:///{{ include "direktiv.fullname" . }}-ingress.{{ .Release.Namespace }}:6666"
      {{- if ne .Values.ingress.certificate "none" }}
      tls = false
      {{- else }}
      tls = true
      {{- end }}

    [server]
      bind = ":8080"

    [templates]
      [[workflowTemplateDirectories]]
        name = "default"
        directory = "/tmp/workflow-templates"

      [[actionTemplateDirectories]]
        name = "default"
        directory = "/tmp/action-templates"
