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>
pull/1835/head^2 argocd-apps-0.0.8
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

@ -2,7 +2,7 @@ apiVersion: v2
name: argocd-apps
description: A Helm chart for managing additional Argo CD Applications and Projects
type: application
version: 0.0.7
version: 0.0.8
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
keywords:
@ -14,5 +14,5 @@ maintainers:
url: https://argoproj.github.io/
annotations:
artifacthub.io/changes: |
- kind: fixed
description: Align changelog structure to show changelogs on Artifact Hub
- kind: added
description: Multiple sources for Application and ApplicationSet

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)

View File

@ -23,8 +23,14 @@ metadata:
{{- end }}
spec:
project: {{ tpl .project $ }}
{{- with .source }}
source:
{{- toYaml .source | nindent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .sources }}
sources:
{{- toYaml . | nindent 4 }}
{{- end }}
destination:
{{- toYaml .destination | nindent 4 }}
{{- with .syncPolicy }}

View File

@ -52,8 +52,14 @@ spec:
{{- with .spec }}
spec:
project: {{ tpl .project $ }}
{{- with .source }}
source:
{{- toYaml .source | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .sources }}
sources:
{{- toYaml . | nindent 8 }}
{{- end }}
destination:
{{- toYaml .destination | nindent 8 }}
{{- with .syncPolicy }}

View File

@ -15,6 +15,14 @@ applications: []
# path: guestbook
# directory:
# recurse: true
# # ArgoCD v2.6 or later
# 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: guestbook