Add application-set
This commit is contained in:
36
apps/applicationset-nextcloud.yaml
Normal file
36
apps/applicationset-nextcloud.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
name: nextcloud-apps
|
||||
namespace: argocd
|
||||
spec:
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git
|
||||
revision: main
|
||||
# Il va chercher tous les dossiers dans "nextcloud/"
|
||||
directories:
|
||||
- path: nextcloud/*
|
||||
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: https://kubernetes.default.svc
|
||||
# Déploie dans le namespace "nextcloud-dev" ou "nextcloud-prd"
|
||||
namespace: 'nextcloud-{{path.basename}}'
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
@@ -1,25 +0,0 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: nextcloud-dev
|
||||
namespace: argocd-namespace
|
||||
spec:
|
||||
project: default
|
||||
sources: # Notez le 's' à sources
|
||||
- repoURL: https://nextcloud.github.io/helm/
|
||||
chart: nextcloud
|
||||
targetRevision: 8.6.1
|
||||
helm:
|
||||
# On lie les values du second repo ci-dessous
|
||||
valueFiles:
|
||||
- $values/nextcloud/dev/values.yaml
|
||||
- repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git
|
||||
targetRevision: main
|
||||
ref: values # On donne un alias à ce repo
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: nextcloud-dev
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
@@ -1,25 +0,0 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: nextcloud2-dev
|
||||
namespace: argocd-namespace
|
||||
spec:
|
||||
project: default
|
||||
sources: # Notez le 's' à sources
|
||||
- repoURL: https://nextcloud.github.io/helm/
|
||||
chart: nextcloud
|
||||
targetRevision: 8.6.1
|
||||
helm:
|
||||
# On lie les values du second repo ci-dessous
|
||||
valueFiles:
|
||||
- $values/nextcloud/dev/values.yaml
|
||||
- repoURL: https://git.gkdomaine.fr/kubernetes/argocd.git
|
||||
targetRevision: main
|
||||
ref: values # On donne un alias à ce repo
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: nextcloud2-dev
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
Reference in New Issue
Block a user