Adding ArgoCD Applications#

This doc explains how to add ArgoCD Applications declaratively to the apps repo.

Pre-requisites#

  • You should have kustomize installed

  • You should be familiar with kustomize overlays

  • You should be familiar with what an ArgoCD application is.

  • You or your team should have been on boarded to ArgoCD, and have an ArgoCD project created. If you do not have one please request one for your team by filing this issue here.

Add an Application to the Apps repo (declaratively)#

All our clusters belong to some environment. The list of our environments can be found here. Within each environment you will find a list of clusters. For example within moc environment, you will find clusters infra and smaug. Pick one such cluster that you would like to deploy to. Let’s say you would like to deploy to cluster called ${CLUSTER_NAME} in environment ${ENV}. Then follow these steps:

  • See ArgoCD Docs for how to create an ArgoCD Application here.

  • Ensure that the spec.destination field in your Argocd Applicaiton matches the cluster name as it’s stored in ArgoCD. To get this value, you can search the metadata.name in the clusters found here. Or look at any of the other manifests in this repo and find the one that corresponds to ${CLUSTER_NAME}.

  • Ensure that your spec.project matches your team’s ArgoCD project.

  • Add your ArgoCD Application to argocd/overlays/moc-infra/applications/envs/${ENV}/${CLUSTER_NAME}/{$PROJECT} where {$PROJECT} correlates with your team’s project.

  • Add this resource’s file name to the resource field list in argocd/overlays/moc-infra/applications/envs/${ENV}/${CLUSTER_NAME}/{$PROJECT}/kustomization.yaml .