Adrien Bouvais 2fef740a5f
Some checks failed
Build and Push Docker Images / build-and-push (push) Failing after 29s
Added tenant-b + removed name in config to use path
2026-08-15 16:38:02 +02:00

42 lines
1.2 KiB
YAML

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: tenants
namespace: argocd
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
generators:
- git:
repoURL: https://git.bouvais.lu/adrien/ctie-exercice
revision: main
files:
- path: "tenants/*/config.yaml"
template:
metadata:
name: 'tenant-{{ trimPrefix "tenant-" .path.basename }}'
spec:
project: tenants
sources:
- repoURL: https://git.bouvais.lu/adrien/ctie-exercice
targetRevision: main
path: charts/tenant
helm:
valueFiles:
- '$values/{{.path.path}}/config.yaml'
parameters:
- name: name
value: '{{ trimPrefix "tenant-" .path.basename }}'
- repoURL: https://git.bouvais.lu/adrien/ctie-exercice
targetRevision: main
ref: values
destination:
server: https://kubernetes.default.svc
namespace: 'tenant-{{ trimPrefix "tenant-" .path.basename }}'
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true