{{- if (include "kafka.log4j.createConfigMap" .) }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "kafka.log4j.configMapName" . }}
  labels: {{- include "kafka.labels" . | nindent 4 }}
    {{- if .Values.commonLabels }}
    {{- include "kafka.tplValue" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
    {{- end }}
  {{- if .Values.commonAnnotations }}
  annotations: {{- include "kafka.tplValue" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  {{- end }}
data:
  log4j.properties: |-
    {{ .Values.log4j | nindent 4 }}
{{- end -}}
