diff --git a/apps/applicationset-nextcloud.yaml b/apps/applicationset-nextcloud.yaml index 4d4e434..4991893 100644 --- a/apps/applicationset-nextcloud.yaml +++ b/apps/applicationset-nextcloud.yaml @@ -8,9 +8,8 @@ spec: - git: repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git revision: main - # Il va chercher tous les dossiers dans "nextcloud/" - directories: - - path: nextcloud/* + files: + - path: "nextcloud/*/config.json" # Il lit le fichier de config template: metadata: # {{path.basename}} sera remplacé par "dev" ou "prd" @@ -25,8 +24,7 @@ spec: valueFiles: - values.yaml destination: - server: https://kubernetes.default.svc - # Déploie dans le namespace "nextcloud-dev" ou "nextcloud-prd" + server: '{{server}}' # Il utilise la variable définie dans config.json namespace: 'nextcloud-{{path.basename}}' syncPolicy: automated: diff --git a/nextcloud/dev/config.json b/nextcloud/dev/config.json new file mode 100644 index 0000000..e625fef --- /dev/null +++ b/nextcloud/dev/config.json @@ -0,0 +1 @@ +{"server": "https://kubernetes.default.svc"} \ No newline at end of file diff --git a/nextcloud/prd/config.json b/nextcloud/prd/config.json new file mode 100644 index 0000000..e625fef --- /dev/null +++ b/nextcloud/prd/config.json @@ -0,0 +1 @@ +{"server": "https://kubernetes.default.svc"} \ No newline at end of file