MongoDB on Kubernetes not taking custom configMap

I am installing MongoDB on Kubernetes using helm charts. The DB path is not getting set to the value provided in ConfigMap in Values.yaml. I have created persistent volume claim and mount a folder on same.

The data gets lost after re-install mongodb.

I would use the operator. That is the most tested path.