<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>What you could do is use Kustomize. Let me show you with an example that I use for my Prometheus installation.</p>
<p>I'm using the kube-prometheus-stack helm chart, but add some more custom resources like a SecretProviderClass.</p>
<p>kustomization.yaml:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

helmCharts:
  - name: kube-prometheus-stack
    repo: https://prometheus-community.github.io/helm-charts
    version: 39.11.0
    releaseName: prometheus
    namespace: prometheus
    valuesFile: values.yaml
    includeCRDs: true

resources:
  - secretproviderclass.yaml

</code></pre>
<p>I can then build the Kustomize yaml by running <code>kustomize build . --enable-helm</code> from within the same folder as where my kustomization.yaml file is.</p>
<p>I use this with my gitops setup, but you can use this standalone as well.</p>
<p>My folder structure would look something like this:</p>
<pre><code>.
├── kustomization.yaml
├── secretproviderclass.yaml
└── values.yaml
</code></pre>
