<p>I was wondering if it is possible to include a configmap with its own values.yml file with a helm chart repository that I am not managing locally. This way, I can uninstall the resource with the name of the chart.</p>
<p>Example:</p>
<p>I am using New Relics Helm chart repository and installing the helm charts using their repo name. I want to include a configmap used for infrastructure settings with the same helm deployment without having to use a kubectl apply to add it independently.</p>
<p>I also want to avoid having to manage the repo locally as I am pinning the version and other values separately from the help upgrade install set triggers.</p>

<p>Using only Helm without any 3rd party tools like kustomize there are two solutions:</p>
<ol>
<li><p>Depend on the configurability of the Chart you are using as described by @Akshay in the other answer</p>
</li>
<li><p>Declare the Chart you are looking to add a ConfigMap to as a <a href="https://helm.sh/docs/helm/helm_dependency/" rel="nofollow noreferrer">dependency</a></p>
</li>
</ol>
<p>You can manage the Chart dependencies in the <code>Chart.yaml</code> file:</p>
<pre><code># Chart.yaml
dependencies:
- name: nginx
  version: &quot;1.2.3&quot;
  repository: &quot;https://example.com/charts&quot;
</code></pre>
<p>With the dependency in place, you can add your own resource files (e.g., the ConfigMap) to the chart. During Helm install, all dependencies and your custom files will be merged into a single Helm deployment.</p>
<pre><code>my-nginx-chart/:
  values.yaml # defines all values including the dependencies
  Chart.yaml # declares the dependencies
  templates/ # custom resources to be added on top of the dependencies
    configmap.yaml # the configmap you want to add
</code></pre>
<p>To configure values for a dependency, you need to prefix the parameters in your <code>values.yaml</code>:</p>
<pre><code>my-configmap-value: Hello World
nginx: #&lt;- refers to &quot;nginx&quot; dependency
  image: ...
</code></pre>
