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