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