Files
argocd/apps/applicationset-nextcloud.yaml
2025-12-28 04:11:57 +01:00

34 lines
1015 B
YAML

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: nextcloud-apps
namespace: argocd-namespace
spec:
generators:
- git:
repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git
revision: main
files:
- path: "nextcloud/*/config.json" # Il lit le fichier de config
template:
metadata:
# {{path.basename}} sera remplacé par "dev" ou "prd"
name: 'nextcloud-{{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: 'nextcloud-{{path.basename}}'
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true