apiVersion: v1
kind: ConfigMap
metadata:
  name: ilogtail-user-cm
data:
{{- if .Values.defaultConfig.enable }}
  default.yaml: |
    enable: true
    inputs:
    - Type: service_docker_stdout
      Stderr: {{ .Values.defaultConfig.stderr }}
      Stdout: {{ .Values.defaultConfig.stdout }}
      IncludeK8sLabel:
        {{- toYaml .Values.defaultConfig.labelSelector | nindent 8 }}
    processors:
      {{- toYaml .Values.defaultConfig.processors | nindent 4 }}
    flushers:
      {{- $flushers := list .Values.defaultConfig.flusher }} 
      {{- toYaml $flushers | nindent 4 }}

{{- end }}

{{- range $key, $value := .Values.configs }}
  {{ $key }}.yaml: |
    {{- toYaml $value | nindent 4 }}
{{- end }}

