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:
parent
eb102d27aa
commit
31768175b9
8 changed files with 108 additions and 7 deletions
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
name: argocd-apps
|
name: argocd-apps
|
||||||
description: A Helm chart for managing additional Argo CD Applications and Projects
|
description: A Helm chart for managing additional Argo CD Applications and Projects
|
||||||
type: application
|
type: application
|
||||||
version: 0.0.7
|
version: 0.0.8
|
||||||
home: https://github.com/argoproj/argo-helm
|
home: https://github.com/argoproj/argo-helm
|
||||||
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
||||||
keywords:
|
keywords:
|
||||||
|
@ -14,5 +14,5 @@ maintainers:
|
||||||
url: https://argoproj.github.io/
|
url: https://argoproj.github.io/
|
||||||
annotations:
|
annotations:
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- kind: fixed
|
- kind: added
|
||||||
description: Align changelog structure to show changelogs on Artifact Hub
|
description: Multiple sources for Application and ApplicationSet
|
||||||
|
|
|
@ -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
|
30
charts/argocd-apps/ci/applications-values.yaml
Normal file
30
charts/argocd-apps/ci/applications-values.yaml
Normal 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/
|
|
@ -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
|
|
@ -1,8 +1,7 @@
|
||||||
# Test with applicationsets
|
# Test with applicationsets
|
||||||
|
|
||||||
applicationsets:
|
applicationsets:
|
||||||
- name: guestbook
|
- name: applicationset
|
||||||
namespace: default # Only for test purpose.
|
|
||||||
additionalLabels: {}
|
additionalLabels: {}
|
||||||
additionalAnnotations: {}
|
additionalAnnotations: {}
|
||||||
# See PR #10026 (ArgoCD v2.5 or later)
|
# See PR #10026 (ArgoCD v2.5 or later)
|
||||||
|
|
|
@ -23,8 +23,14 @@ metadata:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
project: {{ tpl .project $ }}
|
project: {{ tpl .project $ }}
|
||||||
|
{{- with .source }}
|
||||||
source:
|
source:
|
||||||
{{- toYaml .source | nindent 4 }}
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .sources }}
|
||||||
|
sources:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
destination:
|
destination:
|
||||||
{{- toYaml .destination | nindent 4 }}
|
{{- toYaml .destination | nindent 4 }}
|
||||||
{{- with .syncPolicy }}
|
{{- with .syncPolicy }}
|
||||||
|
|
|
@ -52,8 +52,14 @@ spec:
|
||||||
{{- with .spec }}
|
{{- with .spec }}
|
||||||
spec:
|
spec:
|
||||||
project: {{ tpl .project $ }}
|
project: {{ tpl .project $ }}
|
||||||
|
{{- with .source }}
|
||||||
source:
|
source:
|
||||||
{{- toYaml .source | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .sources }}
|
||||||
|
sources:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
destination:
|
destination:
|
||||||
{{- toYaml .destination | nindent 8 }}
|
{{- toYaml .destination | nindent 8 }}
|
||||||
{{- with .syncPolicy }}
|
{{- with .syncPolicy }}
|
||||||
|
|
|
@ -15,6 +15,14 @@ applications: []
|
||||||
# path: guestbook
|
# path: guestbook
|
||||||
# directory:
|
# directory:
|
||||||
# recurse: true
|
# 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:
|
# destination:
|
||||||
# server: https://kubernetes.default.svc
|
# server: https://kubernetes.default.svc
|
||||||
# namespace: guestbook
|
# namespace: guestbook
|
||||||
|
|
Loading…
Reference in a new issue