{{- if and .Values.shards .Values.shardsvr.dataNode.config }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "mongodb-sharded.fullname" . }}-shardsvr-data
  labels: {{- include "mongodb-sharded.labels" . | nindent 4 }}
    app.kubernetes.io/component: shardsvr
data:
  mongodb.conf: |-
    {{- include "mongodb-sharded.tplValue" (dict "value" .Values.shardsvr.dataNode.config "context" $) | indent 4 }}
{{- end }}