{{- if and (eq .Values.mode "daemonset") (.Values.configMap.create) (not .Values.configMap.existingName) -}} apiVersion: v1 kind: ConfigMap metadata: name: {{ include "opentelemetry-collector.fullname" . }}-agent namespace: {{ template "opentelemetry-collector.namespace" . }} labels: {{- include "opentelemetry-collector.labels" . | nindent 4 }} data: relay: | {{- include "opentelemetry-collector.daemonsetConfig" . | nindent 4 -}} {{- end }}