{{- if .Values.config }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "prometheus-snmp-exporter.fullname" . }}
  labels:
    app.kubernetes.io/name: {{ include "prometheus-snmp-exporter.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    helm.sh/chart: {{ include "prometheus-snmp-exporter.chart" . }}
data:
  snmp.yaml: |
{{ toYaml .Values.config | indent 4 }}
{{- end }}
