feat(argocd-apps): multiple sources for Application and ApplicationSet (#1831)

* feat(argocd-apps): multiple sources for application and applicationset

Signed-off-by: toyamagu <toyamagu2021@gmail.com>

* fix typo

Signed-off-by: toyamagu2021@gmail.com <toyamagu2021@gmail.com>

---------

Signed-off-by: toyamagu <toyamagu2021@gmail.com>
Signed-off-by: toyamagu2021@gmail.com <toyamagu2021@gmail.com>
Co-authored-by: Aikawa <yu.croco@gmail.com>
This commit is contained in:
toyamagu 2023-02-10 07:43:38 +09:00 committed by GitHub
parent eb102d27aa
commit 31768175b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 108 additions and 7 deletions

View file

@ -0,0 +1,28 @@
# Test with multi-source applications
applications:
- name: argocd-application-multiple-sources
additionalLabels: {}
additionalAnnotations: {}
finalizers:
- resources-finalizer.argocd.argoproj.io
project: default
sources:
- chart: elasticsearch
repoURL: https://helm.elastic.co
targetRevision: 8.5.1
- repoURL: https://github.com/argoproj/argocd-example-apps.git
path: guestbook
targetRevision: HEAD
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: false
selfHeal: false
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas

View file

@ -0,0 +1,30 @@
# Test with applications
applications:
- name: argocd-application
additionalLabels: {}
additionalAnnotations: {}
finalizers:
- resources-finalizer.argocd.argoproj.io
project: default
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: guestbook
directory:
recurse: true
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: false
selfHeal: false
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas
info:
- name: url
value: https://argoproj.github.io/

View file

@ -0,0 +1,24 @@
# Test with multi-source applicationsets
applicationsets:
- name: applicationset-multiple-sources
generators:
- list:
elements:
- cluster: default-cluster
url: https://kubernetes.default.svc
template:
metadata:
name: '{{cluster}}-guestbook'
spec:
project: default
sources:
- chart: elasticsearch
repoURL: https://helm.elastic.co
targetRevision: 8.5.1
- repoURL: https://github.com/argoproj/argocd-example-apps.git
path: guestbook
targetRevision: HEAD
destination:
server: '{{url}}'
namespace: default

View file

@ -1,8 +1,7 @@
# Test with applicationsets
applicationsets:
- name: guestbook
namespace: default # Only for test purpose.
- name: applicationset
additionalLabels: {}
additionalAnnotations: {}
# See PR #10026 (ArgoCD v2.5 or later)