Files
argocd/apps/applicationset-headlamp.yaml
2025-12-30 19:10:52 +01:00

34 lines
1011 B
YAML

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: headlamp-apps
namespace: argocd-namespace
spec:
generators:
- git:
repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git
revision: main
files:
- path: "headlamp/*/config.json" # Il lit le fichier de config
template:
metadata:
# {{path.basename}} sera remplacé par "dev" ou "prd"
name: 'headlamp-{{path.basename}}'
spec:
project: '{{path.basename}}'
source:
repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git
targetRevision: main
path: '{{path}}' # Utilise le chemin du dossier trouvé
helm:
valueFiles:
- values.yaml
destination:
server: '{{server}}' # Il utilise la variable définie dans config.json
namespace: 'headlamp-{{path.basename}}'
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true