Maven / ArgoCD interview questions
What is an ArgoCD ApplicationSet and how does the Git generator work?
An ApplicationSet is an ArgoCD CRD that automates the creation, update, and deletion of multiple Application resources from a single template. Instead of manually writing one Application manifest per environment or cluster, you define a template once and pair it with a generator that produces parameter sets used to fill the template. The ApplicationSet controller manages these generated Applications automatically.
Git Generator
The Git generator has two modes:
- Directories mode: scans a repo for directories matching a glob; each matching directory becomes one Application with
pathset to that directory. - Files mode: reads JSON/YAML config files matching a pattern; each file's key-value pairs are passed as parameters into the template.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-apps
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/my-org/infra
revision: HEAD
directories:
- path: apps/*
template:
metadata:
name: "{{path.basename}}"
spec:
project: default
source:
repoURL: https://github.com/my-org/infra
targetRevision: HEAD
path: "{{path}}"
destination:
server: https://kubernetes.default.svc
namespace: "{{path.basename}}"
syncPolicy:
automated:
prune: trueWhen a new directory apps/payments is pushed to Git, the controller automatically creates an Application named payments — no manual ArgoCD intervention needed. Removing the directory triggers deletion of the generated Application when pruning is enabled on the ApplicationSet.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
