ArgoCD is probably the most advanced GitOps tool we can use at this moment. It was featured in the Trial quadrant of the Thoughtworks Radar, May 2020 edition and it is also part of the CNCF Continuous Delivery Radar from June 2020 on Asses. The project was admitted into CNCF in April 2020 and since then it attracted more and more users and contributors.

Image for post

The latest version of ArgoCD, when I am writing this, is 1.7.0, released on 25 August 2020. It has many new features and 2 of them seem to be more interesting: ability to use only signed commits for applying state changes and allowing usage of cluster names for application destination (in previous version you could have only used cluster url). Next I would like to go through some examples on how to use the cluster name instead of url. This allows a better user experience because cluster urls are sometimes generated, when using managed services like EKS or AKS, so it is much harder to know if that is really the dev cluster you are applying your application on or maybe some production one. While this feature seems to be really easy to use, just pass the cluster name instead of url, it has some gotchas you need to pay attention to.

All the files needed for the commands below can be found in this repo: https://github.com/lcostea/argocd-cluster-name-article. So please clone it and then cd into it:

git clone https://github.com/lcostea/argocd-cluster-name-article.git
cd argocd-cluster-name-article

Install ArgoCD 1.7.8

First, lets install ArgoCD 1.7.8, which is now the latest patch. I have kind installed locally, so I am going to spin a new cluster. If you don’t have kind, here are instructions for installing it.

kind create cluster --name argocd1.7

After the cluster is up and running and your context is pointing at it, we will install ArgoCD, first create the “argocd” namespace and then we will apply the 1.7.8 manifests (please stick to this argocd namespace, other name will create problems when using manifests directly and not kustomize):

kubectl create namespace argocd

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v1.7.8/manifests/install.yaml

#argo #devops #continuous-delivery #gitops #kubernetes

ArgoCD: Setup external clusters by name
1.65 GEEK