fix: Changed the project field of the applicationset from a tpl function to a string. Signed-off-by: tomoki-yamaguchi <toyamagu2021@gmail.com>
This commit is contained in:
parent
00e585342a
commit
086310f237
3 changed files with 33 additions and 4 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.9
|
version: 1.0.0
|
||||||
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: added
|
- kind: fixed
|
||||||
description: Multiple sources for Application and ApplicationSet
|
description: Changed the project field of the applicationset from a tpl function to a string.
|
||||||
|
|
|
@ -42,3 +42,32 @@ applicationsets:
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
# Set Application finalizer
|
# Set Application finalizer
|
||||||
preserveResourcesOnDeletion: false
|
preserveResourcesOnDeletion: false
|
||||||
|
- name: applicationset-list-generator
|
||||||
|
generators:
|
||||||
|
- list:
|
||||||
|
elements:
|
||||||
|
- cluster: engineering-dev
|
||||||
|
url: https://kubernetes.default.svc
|
||||||
|
template:
|
||||||
|
metadata: {}
|
||||||
|
spec:
|
||||||
|
project: '{{cluster}}'
|
||||||
|
source:
|
||||||
|
targetRevision: HEAD
|
||||||
|
repoURL: https://github.com/argoproj/argo-cd.git
|
||||||
|
# New path value is generated here:
|
||||||
|
path: 'applicationset/examples/template-override/{{cluster}}-override'
|
||||||
|
destination: {}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: '{{cluster}}-guestbook'
|
||||||
|
spec:
|
||||||
|
project: '{{cluster}}'
|
||||||
|
source:
|
||||||
|
repoURL: https://github.com/argoproj/argo-cd.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
# This 'default' value is not used: it is is replaced by the generator's template path, above
|
||||||
|
path: applicationset/examples/template-override/default
|
||||||
|
destination:
|
||||||
|
server: '{{url}}'
|
||||||
|
namespace: guestbook
|
||||||
|
|
|
@ -51,7 +51,7 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .spec }}
|
{{- with .spec }}
|
||||||
spec:
|
spec:
|
||||||
project: {{ tpl .project $ }}
|
project: {{ .project | squote }}
|
||||||
{{- with .source }}
|
{{- with .source }}
|
||||||
source:
|
source:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
|
Loading…
Reference in a new issue