<p>I have two projects:</p>
<blockquote>
<p>Project A - Contains the Source code for my Microservice application</p>
<p>Project B - Contains the Kubernetes resources for Project A using Helm</p>
</blockquote>
<p>Both the Projects reside in their own separate git repositories.</p>
<p>Project A builds using a full blown CI pipeline that build a Docker image with a tag version and pushes it into the Docker hub and then writes the version number for the Docker image into Project B via a git push from the CI server. It does so by committing a simple txt file with the Docker version that it just built.</p>
<p>So far so good! I now have Project B which contains this Docker version for the Microservice Project A and I now want to pass / inject this value into the Values.yaml so that when I package the Project B via Helm, I have the latest version.</p>
<p>Any ideas how I could get this implemented?</p>

joesan
<blockquote>
<p>via a git push from the CI server. It does so by committing a simple txt file with the Docker version that it just built.</p>
</blockquote>
<p>What I usually do here, is that I write the value to the correct field in the yaml directly. To work with yaml on the command line, I recommend the cli tool <a href="https://github.com/mikefarah/yq" rel="nofollow noreferrer">yq</a>.</p>
<p>I usually use full Kubernetes <code>Deployment</code> manifest yaml and I typically update the image field with this <code>yq</code> command:</p>
<pre><code>yq write --inplace deployment.yaml 'spec.template.spec.containers(name==myapp).image' &lt;my-registry&gt;/&lt;my-image-repo&gt;/&lt;image-name&gt;:&lt;tag-name&gt;
</code></pre>
<p>and after that commit the yaml file to the repo with yaml manifests.</p>
<p>Now, you use Helm but it is still Yaml, so you should be able to solve this in a similar way. Maybe something like:</p>
<pre><code>yq write --inplace values.yaml 'app.image' &lt;my-image&gt;
</code></pre>
