I'm trying to figure out how to share data between two charts in helm.
I've set up a chart with a sole YAML for a configmap in one chart. Let's call the chart cm1. It defines it's name like so:
name: {{ .Release.Name }}-maps
Then I set up two charts that deploy containers that would want to access the data in the configmap in c1. Let's call them c1 and c2. c1 has a requirements.yaml that references the chart for cm1, and likewise for c2. Now I have a parent chart that tries to bring it all together, let's call it p1. p1 defines c1 and c2 in requirements.yaml. The I helm install --name k1 p1 and I get an error:
Error: release k1 failed: configmaps "k1-maps" already exists.
I thought that when helm builds its dependency tree that it would see that the k1-maps was already defined when chart cm1 was first loaded.
What's the best practice to share a configmap between two charts?