feat(argocd-apps)!: use maps instead of lists (#2538)
* feat(argocd-apps)!: use maps instead of lists Signed-off-by: irizzant <i.rizzante@gmail.com> * fix(chart): add artifacthub annotations Signed-off-by: irizzant <i.rizzante@gmail.com> * fix: remove not needed lines Signed-off-by: irizzant <i.rizzante@gmail.com> * fix: use the right range function Signed-off-by: irizzant <i.rizzante@gmail.com> * fix(argocd-apps): fix issues Signed-off-by: irizzant <i.rizzante@gmail.com> * fix: fix newline issue in values.yaml Signed-off-by: irizzant <i.rizzante@gmail.com> * fix: Use range function properly (revert complex changes on item-templates) Signed-off-by: Marco Maurer <mkilchhofer@users.noreply.github.com> --------- Signed-off-by: irizzant <i.rizzante@gmail.com> Signed-off-by: Marco Maurer <mkilchhofer@users.noreply.github.com> Co-authored-by: Jason Meridth <jmeridth@gmail.com> Co-authored-by: Marco Maurer <mkilchhofer@users.noreply.github.com> Co-authored-by: Aikawa <yu.croco@gmail.com>
This commit is contained in:
parent
393402cb1b
commit
237493a4ab
12 changed files with 428 additions and 429 deletions
|
|
@ -1,90 +1,90 @@
|
|||
# Test with applicationsets
|
||||
|
||||
applicationsets:
|
||||
- name: applicationset
|
||||
additionalLabels: {}
|
||||
additionalAnnotations: {}
|
||||
# See PR #10026 (ArgoCD v2.5 or later)
|
||||
# goTemplate: false
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://github.com/argoproj/argocd-example-apps.git
|
||||
revision: HEAD
|
||||
directories:
|
||||
- path: guestbook
|
||||
- path: kustomize-*
|
||||
# Ref https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Controlling-Resource-Modification/#allow-temporarily-toggling-auto-sync
|
||||
ignoreApplicationDifferences:
|
||||
- jsonPointers:
|
||||
- /spec/syncPolicy
|
||||
template:
|
||||
metadata:
|
||||
name: '{{path.basename}}'
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
applicationset:
|
||||
additionalLabels: {}
|
||||
additionalAnnotations: {}
|
||||
# See PR #10026 (ArgoCD v2.5 or later)
|
||||
# goTemplate: false
|
||||
generators:
|
||||
- git:
|
||||
repoURL: https://github.com/argoproj/argocd-example-apps.git
|
||||
targetRevision: HEAD
|
||||
path: '{{path}}'
|
||||
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/
|
||||
syncPolicy:
|
||||
# Set Application finalizer
|
||||
preserveResourcesOnDeletion: false
|
||||
templatePatch: |
|
||||
spec:
|
||||
source:
|
||||
helm:
|
||||
valueFiles:
|
||||
{{- range $valueFile := .valueFiles }}
|
||||
- {{ $valueFile }}
|
||||
{{- end }}
|
||||
{{- if .autoSync }}
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: {{ .prune }}
|
||||
{{- end }}
|
||||
- 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
|
||||
revision: HEAD
|
||||
directories:
|
||||
- path: guestbook
|
||||
- path: kustomize-*
|
||||
# Ref https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Controlling-Resource-Modification/#allow-temporarily-toggling-auto-sync
|
||||
ignoreApplicationDifferences:
|
||||
- jsonPointers:
|
||||
- /spec/syncPolicy
|
||||
template:
|
||||
metadata:
|
||||
name: '{{path.basename}}'
|
||||
labels: {}
|
||||
annotations: {}
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://github.com/argoproj/argocd-example-apps.git
|
||||
targetRevision: HEAD
|
||||
path: '{{path}}'
|
||||
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/
|
||||
syncPolicy:
|
||||
# Set Application finalizer
|
||||
preserveResourcesOnDeletion: false
|
||||
templatePatch: |
|
||||
spec:
|
||||
source:
|
||||
helm:
|
||||
valueFiles:
|
||||
{{- range $valueFile := .valueFiles }}
|
||||
- {{ $valueFile }}
|
||||
{{- end }}
|
||||
{{- if .autoSync }}
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: {{ .prune }}
|
||||
{{- end }}
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue