ArgoCD ApplicationSet with Applications, Image Updater and Notification controller with SSO

Jamal Shahverdiev
2 min readAug 27, 2022

--

The purpose of this article, to show the way how to create automatically testing environment, for QA engineers when new version of application already written by software developers. Just imagine developers going to create new branch from main by style branch-1111=”Jira Project Key”-”Jira task Number” ) to develop new feature and create Pull Request of this branch to main with exactly label preview. When this PR created, trigger happens to create new Applications in ArgoCD by style branch-prnumber. Image used inside of this appication (which created by PR event with preview label) create by Cloud Build (Google Cloud Platform feature). ArgoCD Image updater analyzing remote docker image registry for new change of images to inform back application with defined branch-prnumber. Even if, new commit comes inside same PR branch then, trigger happening again and applications going to pull latest image tag from Google Artifactory Registry. When PR is Closed or Merged, Applications inside of ArgoCD going to be deleted automatically. All deployment states of ArgoCD applications going to be notified to slack channels. In this lab I split Slack channels by type of alerts and show way how dynamically change slack alert content. So it means, QA engineers looking to Slack channel to get new A DNS record hyperlink of Full Qualified Doman name with subdomain as https://branch-prnumber.environment.company.domain and click on it to start tests. If tests OK, then branch going to be merged, if not new commits comes inside of same A record to continue tests.

All topology looks like as following:

To get all code files usage in this lab you can clone the following repository. In the repository, I created folder to clean ArgoCD created unneded files by CronJob inside argocd-cleaner folder. In the folder applicationset I create helm chart to create range of Applicationset.

$ git clone https://github.com/jamalshahverdiev/gitops.git && cd gitops/argo/argocd

All deployment flow we can watch in the following video. I hope it will be useful.

--

--

Jamal Shahverdiev
Jamal Shahverdiev

No responses yet