<p>So, what I'm trying to do is use helm to install an application to my kubernetes cluster. Let's say the image tag is 1.0.0 in the chart.</p>

<p>Then, as part of a CI/CD build pipeline, I'd like to update the image tag using kubectl, i.e. <code>kubectl set image deployment/myapp...</code> </p>

<p>The problem is if I subsequently make any change to the helm chart (e.g. number of replicas), and I <code>helm upgrade myapp</code> this will revert the image tag back to 1.0.0.</p>

<p>I've tried passing in the --reuse-values flag to the helm upgrade command but that hasn't helped. </p>

<p>Anyone have any ideas? Do I need to use helm to update the image tag? I'm trying to avoid this, as the chart is not available at this stage in the pipeline.</p>

Darragh
<p>When using CI/CD to build and deploy, you should use a <em>single source-of-truth</em>, that means a file versioned in e.g. Git and you do <em>all changes</em> in that file. So if you use Helm charts, they should be stored in e.g. Git and all changes (e.g. new image) should be done in your Git repository.</p>

<p>You could have a <em>build pipeline</em> that in the end <em>commit</em> the new image to a Kubernetes config repository. Then a <em>deployment pipeline</em> is triggered that use Helm or Kustomize to apply your changes and possibly execute tests.</p>
