Skip to content

Instantly share code, notes, and snippets.

@initcron
Created February 23, 2025 13:34
Show Gist options
  • Save initcron/9db60cbee59575f65b02362c4ae5ee5b to your computer and use it in GitHub Desktop.
Save initcron/9db60cbee59575f65b02362c4ae5ee5b to your computer and use it in GitHub Desktop.
ApplicationSet spec to iterate over a list of charts available in the Git Repo using Git Generator: https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators-Git/
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: instavote-dev
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/initcron/instavote-gitops
revision: HEAD
directories:
- path: "charts/*"
template:
metadata:
name: '{{path.basename}}-dev'
annotations:
debug.path: '{{path}}'
debug.path.basename: '{{path.basename}}'
spec:
project: instavote-dev
source:
repoURL: https://github.com/initcron/instavote-gitops
targetRevision: HEAD
path: '{{path}}'
helm:
valueFiles:
- env/dev.yaml
destination:
server: https://kubernetes.default.svc
namespace: 'instavote-dev'
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment