Helm Installation fails with shared config maps I have a couple of deployments in Kubernetes packaged using Helm. Both the deployments are different but they share the same config map.
When performing installation via Helm the first deployment is successful but the second deployment fails with the below error.

Error: rendered manifests contain a resource that already exists. Unable to continue with install: ConfigMap &quot;appconfig&quot; in namespace
&quot;testnamespace&quot; exists and cannot be imported into the current
release: invalid ownership metadata; annotation validation error: key
&quot;meta.helm.sh/release-name&quot; must equal &quot;app2&quot;: current value is
&quot;app2&quot;
Couple of possible solutions:

Control the configmap from a third chart and add the third chart as a dependency in both the charts. This will duplicate the secret and can cause a skew in the values being used both the charts since if they have independent release cycles
Create the configmap in one namespace and refer to it using an external reference. You can see several examples of such at https://github.com/helm/charts/search?q=existingSecret&amp;type=code

I personally prefer option 1 since there is explicit dependency specification and gives the ability to deploy the charts individually