<p>Versioning is generally a pain point in microservice management. I just wrote a Medium article how we are dogfooding our tool Reliza Hub to help with this problem - <a href="https://medium.com/@taleodor/building-kubernetes-cicd-pipeline-with-github-actions-argocd-and-reliza-hub-e7120b9be870" rel="nofollow noreferrer">https://medium.com/@taleodor/building-kubernetes-cicd-pipeline-with-github-actions-argocd-and-reliza-hub-e7120b9be870</a></p>

<p>In short, we have prepared templating engine there which automatically resolves versions based on metadata and approval matrix from Reliza Hub. It then populates k8s definitions for each instance with specific version just for that instance.</p>

<p>If you do it another way, in my experience it usually tends to be manual. Because in most cases it is just to risky to always push latest to your production or even staging.</p>

CC BY-SA 4.0
2020-05-11T20:18:33.573Z
2020-05-11T20:18:33.573Z
taleodor
<blockquote>
<ol start="2">
<li>App repo's CI commits into Configuration repo with newly built image tags.</li>
</ol>
</blockquote>
<p>Yes, this makes sense. Instead of using <em>image tags</em> you can use <em>image digest</em>, since the digest is generated from content, it is immutable, while tags may be updated (intentionally or unintentionally).</p>
<p>This manifest update can be done with multiple tools:</p>
<p>Using <a href="https://github.com/mikefarah/yq" rel="nofollow noreferrer">yq</a></p>
<pre><code>yq write \
  --inplace deployment.yaml \
  'spec.template.spec.containers(name==myappname).image' \
  gcr.io/my-image-repository/myappname:labelOrDigest
</code></pre>
<p>Or using a newer tool; <a href="https://googlecontainertools.github.io/kpt/" rel="nofollow noreferrer">kpt</a> with the <a href="https://googlecontainertools.github.io/kpt/guides/consumer/set/" rel="nofollow noreferrer">kpt set</a> command.</p>

CC BY-SA 4.0
2020-05-11T19:19:01.013Z
2021-06-20T07:23:15.997Z
2021-06-20T07:23:15.997Z
Jonas
<p>i'm trying to do gitops </p>

<p>I have a Configuration repo containing k8 manifests and different app repos. </p>

<p>1) App repo's CI build docker images and pushes into registry.</p>

<p>2) App repo's CI commits into Configuration repo with newly built image tags.</p>

<p>A gitops CD like ArgoCD is listening to configuration repo and deploys(manual/automatic) it to kubernetes.</p>

<p>Is this the right way to do it ?</p>

<kubernetes><git><cicd>
What is the way to update images in a configuration git repository when doing gitops?
Slim Shady
# What is the way to update images in a configuration git repository when doing gitops?

(Asked by: username_0 on 2020-05-10)

i'm trying to do gitops

I have a Configuration repo containing k8 manifests and different app repos.

1) App repo's CI build docker images and pushes into registry.

2) App repo's CI commits into Configuration repo with newly built image tags.

A gitops CD like ArgoCD is listening to configuration repo and deploys(manual/automatic) it to kubernetes.

Is this the right way to do it ?

**Tags:** kubernetes, git, cicd


---

## 2 answers

### Answer by username_2 on 2020-05-11. Score: 3 | Accepted answer

App repo's CI commits into Configuration repo with newly built image tags.


Yes, this makes sense. Instead of using image tags you can use image digest, since the digest is generated from content, it is immutable, while tags may be updated (intentionally or unintentionally).
This manifest update can be done with multiple tools:
Using yq
yq write \
  --inplace deployment.yaml \
  'spec.template.spec.containers(name==myappname).image' \
  gcr.io/my-image-repository/myappname:labelOrDigest

Or using a newer tool; kpt with the kpt set command.


---

### Answer by username_1 on 2020-05-11. Score: 2

Versioning is generally a pain point in microservice management. I just wrote a Medium article how we are dogfooding our tool Reliza Hub to help with this problem - <https://medium.com/@username_1/building-kubernetes-cicd-pipeline-with-github-actions-argocd-and-reliza-hub-e7120b9be870>

In short, we have prepared templating engine there which automatically resolves versions based on metadata and approval matrix from Reliza Hub. It then populates k8s definitions for each instance with specific version just for that instance.

If you do it another way, in my experience it usually tends to be manual. Because in most cases it is just to risky to always push latest to your production or even staging.


---

