{{- if .Values.configmap }}
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app: {{ template "mongodb.name" . }}
    chart: {{ template "mongodb.chart" . }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
  name: {{ template "mongodb.fullname" . }}
  namespace: {{ template "mongodb.namespace" . }}
data:
  mongodb.conf: |-
{{ toYaml .Values.configmap | indent 4 }}
{{- end }}