Deploying a Helm Chart from ArgoCD
Get in the fastlane!

Deploying a Helm Chart from ArgoCD

ArgoCD, the declarative GitOps tool for continuous delivery in Kubernetes is emerging not only as one of the leaders in CD but also has taken a top spot in my toolbox for its simplicity and "cool factor". Here I am going to display a super simple proof of concept for deploying a Helm chart from ArgoCD. This is aimed at consumers which are new to the platform and I will keep things simple. This is not an introduction to GitOps but before we move on, lets review a few important things:

  • What is GitOps? In short, GitOps takes a declarative approach to infrastructure and application configuration utilizing Git as a single source of truth.
  • Wait. What do you mean by a declarative approach? We have two main methodologies to have a look at, imperative and declarative. Short and simple, if you run a command, I.E. `kubectl something`, you're approaching this imperatively. In a declarative manner, the desired state is known, stored as code and if changes are made, these can be reconciled to reflect that desired state.
  • Why a Helm Chart, why not an Operator? Not today Satan, not today. That's not a conversation for a short tutorial such as this!

With all of that said, we have a simple task to achieve; create an application in ArgoCD to deploy from a Helm chart. We will use the Helm chart for external secrets in an "external-secrets" namespace, we assume you have a cluster of some sort and ArgoCD installed somewhere. If none of this is familiar but you're interested, jump over to the following link and get some super informative knowledge. https://demo.openshift.com/en/dev/argocd/

Build your application in ArgoCD, this is super simple!

To create the initial application, populate the name, the project (default, unless you've created additional ArgoCD projects) and the sync policy. I generally avoid an automatic sync policy until I have thoroughly tested my setup. 

No alt text provided for this image


For the source for the ArgoCD, we will define 3 things:

  1. The Repo URL and select Helm for the type.
  2. The Chart itself
  3. The version

No alt text provided for this image


When adding the repo, if you have appropriate permission, your chart and versions should be available in the UI to select.

No alt text provided for this image

Utilizing Helm with a defaults values.yaml file, this will auto populate in the Parameters section for the Argo App. If you would like to add custom variables, you can do so easily by manually editing the values box.

No alt text provided for this image


Sync your application 

With your application properly built, you will see the application in a non-sync state, unless an automatic sync policy was set on build, which I recommend against until you have appropriately tested your applications.

No alt text provided for this image


Finally, if we successfully sync the application, we will see the deployment via Helm take place. 

No alt text provided for this image


In it's simplest form, it's that easy!

Check ArgoCD out and start to explore version controlled ArgoCD applications, utilizing private repos, multiple projects and more here: https://argoproj.github.io/argo-cd/

TL;DR Super Shortcut

Build an ArgoCD application and point it at the following repo, see if you can determine what takes place and why: https://github.com/pbmoses/external-secrets-app.git

what if I want to store my values.yaml files in a versioned way (git repo) ?

To view or add a comment, sign in

Others also viewed

Explore content categories