Deploying a Helm Chart from ArgoCD - pbmoses/external-secrets-app GitHub Wiki

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 is a declarative approach, storing system state in Git. Git is your source of truth, is auditable and all changes can be made there... never logging into a machine! (sorry server huggers, another tough hit to take)
  • Wait. What is 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 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.

Build your application in ArgoCD

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. Initial Application Build

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

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

Argo App Source

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

Default values

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.
Built App

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

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 here, see if you can determine what takes place and why: https://github.com/pbmoses/external-secrets-app.git