diff --git a/apps/applicationset-headlamp.yaml b/apps/applicationset-headlamp.yaml index 5303cef..3f2d525 100644 --- a/apps/applicationset-headlamp.yaml +++ b/apps/applicationset-headlamp.yaml @@ -28,15 +28,15 @@ spec: - path.basename template: metadata: - name: 'headlamp-{{path.basename}}' + name: 'headlamp-{{environment}}' spec: - project: '{{path.basename}}' + project: '{{environment}}' source: - repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git - targetRevision: main + repoURL: '{{repository}}' + targetRevision: '{{targetRevision}}' # Construit explicitement le chemin Helm à partir du basename # pour éviter que {{path}} prenne la valeur du fichier config.json - path: 'helm/headlamp/{{path.basename}}' + path: '{{helmPath}}/headlamp/{{environment}}' helm: valueFiles: - values.yaml @@ -45,10 +45,10 @@ spec: # (deuxième générateur du merge) name: '{{name}}' # server: '{{server}}' - namespace: 'headlamp-{{path.basename}}' + namespace: 'headlamp-{{environment}}' syncPolicy: automated: - prune: true - selfHeal: true + prune: '{{prune}}' + selfHeal: '{{selfHeal}}' syncOptions: - - CreateNamespace=true \ No newline at end of file + - CreateNamespace='{{CreateNamespace}}' \ No newline at end of file diff --git a/configs/config.json.example b/configs/config.json.example new file mode 100644 index 0000000..cc01469 --- /dev/null +++ b/configs/config.json.example @@ -0,0 +1,11 @@ +{ + "environment": "dev", + "name": "cluster-dev", + "repository": "https://git.gkdomaine.fr/kubernetes/argocd.git", + "targetRevision": "main", + "helmPath": "helm", + "autoSync": true, + "prune": true, + "selfHeal": true, + "CreateNamespace": true +} diff --git a/configs/dev/config.json b/configs/dev/config.json index 5b84fc4..cc01469 100644 --- a/configs/dev/config.json +++ b/configs/dev/config.json @@ -1,4 +1,11 @@ { + "environment": "dev", "name": "cluster-dev", - "server": "https://10.78.106.100:6444" + "repository": "https://git.gkdomaine.fr/kubernetes/argocd.git", + "targetRevision": "main", + "helmPath": "helm", + "autoSync": true, + "prune": true, + "selfHeal": true, + "CreateNamespace": true }