How to create a fully-GitOps Helm Deployment in Kargo? #3612
Unanswered
lantern-sam
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This will be a little bit of a brain dump as I've been looking into this quite heavily today with not too much success. I'm interested if there is a proper way of achieving this / if I'm missing something.
Setup
I have a project that has 3 subscriptions. A helm chart, a git repo and a Docker image. The application deployment is simply applying the helm chart with a
values.yml
file from the git repo where Kargo will substitute in the Docker image address.The Helm Chart is used by many apps and is held in a separate Git repo.
I am trying to use ArgoCD / Kargo to do this. We could possibly look at Kustomize if it would help though I'm not sure it would in this case.
The Problem
We update the Helm chart version regularly with additional features / fixes. I want to be able to apply a helm chart of a particular version using Kargo in a completely GitOps way.
Let's take an abridged Quickstart example, using an
ApplicationSet
:Here I've pointed the ApplicationSet at multiple sources. One will get the Helm Chart, the other the values.
However, this hasn't incorporated the version of the Helm Chart in at all. It is of course possible to work around this by using the argocd-update action however the warning on the page is correct that this isn't real GitOps and in the case that we need to rebuild our cluster / the application object is somehow deleted we would then need to re-deploy every service we have for every environment. (Which would not be fun)
I think the second possible way I've thought of doing this is by using the helm-template action to instead pre-render the chart of a particular version and apply the values in the Kargo Promotion Step. However there doesn't seem to be a way to get the chart's content from the Helm Chart's subscription.
The workaround for this would be that I would need to git-clone our Helm Chart repo, checking out the specific tag for that version number and then templating / committing based on those Chart files. This feels like a bit of a weird pattern as the subscription is targetting an image in the OCI registry but then I'm needing to then git-clone the repo on top of that?
Possible Solution
Based on my understanding above, it would be cool if when a freight contains a Helm Chart, it could locally download the contents of that helm chart and you could use chartFrom() or some other expression to point steps (like
helm-template
) to that chart's filesThoughts?
I wondered if there were any official thoughts on how this type of deployment should work. I might have a non-standard setup or it's possible that I just lack some understanding of Argo/Kargo. Any point in a direction would be appreciated! But if this is a valid concern I'll happily change this into a feature request instead, I'm just not super confident that I'm not missing something!
Anyway, thanks for reading if you got this far.
Beta Was this translation helpful? Give feedback.
All reactions