45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
apiVersion: argoproj.io/v1alpha1
|
|
kind: ApplicationSet
|
|
metadata:
|
|
name: tls-sync
|
|
namespace: argocd-ops
|
|
spec:
|
|
generators:
|
|
# Le CronJob de synchronisation TLS est déployé UNIQUEMENT sur le cluster OPS
|
|
- merge:
|
|
generators:
|
|
# Premier générateur : scanne les répertoires Helm pour tls-sync
|
|
- git:
|
|
repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git
|
|
revision: main
|
|
directories:
|
|
- path: "helm/tls-sync/*"
|
|
# Deuxième générateur : lit la config OPS uniquement
|
|
- git:
|
|
repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git
|
|
revision: main
|
|
files:
|
|
- path: "configs/ops/config.json"
|
|
mergeKeys:
|
|
- path.basename
|
|
template:
|
|
metadata:
|
|
name: 'tls-sync-{{path.basename}}'
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: '{{repository}}'
|
|
targetRevision: '{{targetRevision}}'
|
|
path: '{{helmPath}}/tls-sync/{{path.basename}}'
|
|
destination:
|
|
# Déploie uniquement sur le cluster OPS
|
|
name: '{{name}}'
|
|
namespace: certificates-{{path.basename}}
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|
|
syncOptions:
|
|
- CreateNamespace=true
|
|
|