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
|
@ -2,7 +2,7 @@ apiVersion: v2
|
|||
name: argocd-apps
|
||||
description: A Helm chart for managing additional Argo CD Applications and Projects
|
||||
type: application
|
||||
version: 1.6.2
|
||||
version: 2.0.0
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
||||
keywords:
|
||||
|
@ -18,4 +18,4 @@ annotations:
|
|||
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
|
||||
artifacthub.io/changes: |
|
||||
- kind: added
|
||||
description: Support Template Patch to ApplicationSet
|
||||
description: make the chart use maps instead of lists
|
||||
|
|
|
@ -28,11 +28,11 @@ $ helm install my-release argo/argocd-apps
|
|||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| applications | list | `[]` (See [values.yaml]) | Deploy Argo CD Applications within this helm release |
|
||||
| applicationsets | list | `[]` (See [values.yaml]) | Deploy Argo CD ApplicationSets within this helm release |
|
||||
| extensions | list | `[]` (See [values.yaml]) | DEPRECATED - Please refer [Deprecation Notice](https://github.com/argoproj-labs/argocd-extensions?tab=readme-ov-file#deprecation-notice) for more info. |
|
||||
| applications | object | `{}` (See [values.yaml]) | Deploy Argo CD Applications within this helm release |
|
||||
| applicationsets | object | `{}` (See [values.yaml]) | Deploy Argo CD ApplicationSets within this helm release |
|
||||
| extensions | object | `{}` (See [values.yaml]) | DEPRECATED - Please refer [Deprecation Notice](https://github.com/argoproj-labs/argocd-extensions?tab=readme-ov-file#deprecation-notice) for more info. |
|
||||
| itemTemplates | list | `[]` (See [values.yaml]) | Deploy Argo CD Applications/ApplicationSets/Projects within this helm release |
|
||||
| projects | list | `[]` (See [values.yaml]) | Deploy Argo CD Projects within this helm release |
|
||||
| projects | object | `{}` (See [values.yaml]) | Deploy Argo CD Projects within this helm release |
|
||||
|
||||
----------------------------------------------
|
||||
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Test with multi-source applications
|
||||
|
||||
applications:
|
||||
- name: argocd-application-multiple-sources
|
||||
argocd-application-multiple-sources:
|
||||
additionalLabels: {}
|
||||
additionalAnnotations: {}
|
||||
finalizers:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Test with applications
|
||||
|
||||
applications:
|
||||
- name: argocd-application
|
||||
argocd-application:
|
||||
additionalLabels: {}
|
||||
additionalAnnotations: {}
|
||||
finalizers:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Test with multi-source applicationsets
|
||||
|
||||
applicationsets:
|
||||
- name: applicationset-multiple-sources
|
||||
applicationset-multiple-sources:
|
||||
generators:
|
||||
- list:
|
||||
elements:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Test applicationsets with Progressive Syncs
|
||||
|
||||
applicationsets:
|
||||
- name: applicationset-progressive-syncs
|
||||
applicationset-progressive-syncs:
|
||||
generators:
|
||||
- list:
|
||||
elements:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Test with applicationsets
|
||||
|
||||
applicationsets:
|
||||
- name: applicationset
|
||||
applicationset:
|
||||
additionalLabels: {}
|
||||
additionalAnnotations: {}
|
||||
# See PR #10026 (ArgoCD v2.5 or later)
|
||||
|
@ -59,7 +59,7 @@ applicationsets:
|
|||
automated:
|
||||
prune: {{ .prune }}
|
||||
{{- end }}
|
||||
- name: applicationset-list-generator
|
||||
applicationset-list-generator:
|
||||
generators:
|
||||
- list:
|
||||
elements:
|
||||
|
|
|
@ -1,50 +1,50 @@
|
|||
{{- range .Values.applications }}
|
||||
{{- range $appName, $appData:= .Values.applications }}
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
{{- with .additionalAnnotations }}
|
||||
{{- with $appData.additionalAnnotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .additionalLabels }}
|
||||
{{- with $appData.additionalLabels }}
|
||||
labels:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ .name }}
|
||||
{{- with .namespace }}
|
||||
name: {{ $appName }}
|
||||
{{- with $appData.namespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .finalizers }}
|
||||
{{- with $appData.finalizers }}
|
||||
finalizers:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
project: {{ tpl .project $ }}
|
||||
{{- with .source }}
|
||||
project: {{ tpl $appData.project $ }}
|
||||
{{- with $appData.source }}
|
||||
source:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .sources }}
|
||||
{{- with $appData.sources }}
|
||||
sources:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
destination:
|
||||
{{- toYaml .destination | nindent 4 }}
|
||||
{{- with .syncPolicy }}
|
||||
{{- toYaml $appData.destination | nindent 4 }}
|
||||
{{- with $appData.syncPolicy }}
|
||||
syncPolicy:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .revisionHistoryLimit }}
|
||||
{{- with $appData.revisionHistoryLimit }}
|
||||
revisionHistoryLimit: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .ignoreDifferences }}
|
||||
{{- with $appData.ignoreDifferences }}
|
||||
ignoreDifferences:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .info }}
|
||||
{{- with $appData.info }}
|
||||
info:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,44 +1,43 @@
|
|||
|
||||
{{- range .Values.applicationsets }}
|
||||
{{- range $appSetName, $appSetData:= .Values.applicationsets }}
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ApplicationSet
|
||||
metadata:
|
||||
{{- with .additionalAnnotations }}
|
||||
{{- with $appSetData.additionalAnnotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .additionalLabels }}
|
||||
{{- with $appSetData.additionalLabels }}
|
||||
labels:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ .name }}
|
||||
{{- with .namespace }}
|
||||
name: {{ $appSetName }}
|
||||
{{- with $appSetData.namespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if hasKey . "goTemplate" }}
|
||||
goTemplate: {{ .goTemplate }}
|
||||
{{- if hasKey $appSetData "goTemplate" }}
|
||||
goTemplate: {{ $appSetData.goTemplate }}
|
||||
{{- end }}
|
||||
{{- with .generators }}
|
||||
{{- with $appSetData.generators }}
|
||||
generators:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .ignoreApplicationDifferences }}
|
||||
{{- with $appSetData.ignoreApplicationDifferences }}
|
||||
ignoreApplicationDifferences:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .strategy }}
|
||||
{{- with $appSetData.strategy }}
|
||||
strategy:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .syncPolicy }}
|
||||
{{- with $appSetData.syncPolicy }}
|
||||
syncPolicy:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .template }}
|
||||
{{- with $appSetData.template }}
|
||||
template:
|
||||
{{- with .metadata }}
|
||||
metadata:
|
||||
|
@ -84,7 +83,7 @@ spec:
|
|||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- with .templatePatch }}
|
||||
{{- with $appSetData.templatePatch }}
|
||||
templatePatch: |
|
||||
{{- . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
{{- range .Values.extensions }}
|
||||
{{- range $extensionName, $extensionData:= .Values.extensions }}
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: ArgoCDExtension
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
{{- with .namespace }}
|
||||
name: {{ $extensionName }}
|
||||
{{- with $extensionData.namespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
finalizers:
|
||||
- extensions-finalizer.argocd.argoproj.io
|
||||
{{- with .additionalLabels }}
|
||||
{{- with $extensionData.additionalLabels }}
|
||||
labels:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .additionalAnnotations }}
|
||||
{{- with $extensionData.additionalAnnotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .sources }}
|
||||
{{- with $extensionData.sources }}
|
||||
spec:
|
||||
sources:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
|
|
|
@ -1,72 +1,72 @@
|
|||
{{- range .Values.projects }}
|
||||
{{- range $projectName, $projectData := .Values.projects }}
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: AppProject
|
||||
metadata:
|
||||
{{- with .additionalAnnotations }}
|
||||
{{- with $projectData.additionalAnnotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .additionalLabels }}
|
||||
{{- with $projectData.additionalLabels }}
|
||||
labels:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
name: {{ .name }}
|
||||
{{- with .namespace }}
|
||||
name: {{ $projectName }}
|
||||
{{- with $projectData.namespace }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .finalizers }}
|
||||
{{- with $projectData.finalizers }}
|
||||
finalizers:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .permitOnlyProjectScopedClusters }}
|
||||
{{- with $projectData.permitOnlyProjectScopedClusters }}
|
||||
permitOnlyProjectScopedClusters: {{ . }}
|
||||
{{- end }}
|
||||
description: {{ .description }}
|
||||
{{- with .sourceRepos }}
|
||||
description: {{ $projectData.description }}
|
||||
{{- with $projectData.sourceRepos }}
|
||||
sourceRepos:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .destinations }}
|
||||
{{- with $projectData.destinations }}
|
||||
destinations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .clusterResourceWhitelist }}
|
||||
{{- with $projectData.clusterResourceWhitelist }}
|
||||
clusterResourceWhitelist:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .clusterResourceBlacklist }}
|
||||
{{- with $projectData.clusterResourceBlacklist }}
|
||||
clusterResourceBlacklist:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .namespaceResourceBlacklist }}
|
||||
{{- with $projectData.namespaceResourceBlacklist }}
|
||||
namespaceResourceBlacklist:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .namespaceResourceWhitelist }}
|
||||
{{- with $projectData.namespaceResourceWhitelist }}
|
||||
namespaceResourceWhitelist:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .orphanedResources }}
|
||||
{{- with $projectData.orphanedResources }}
|
||||
orphanedResources:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .roles }}
|
||||
{{- with $projectData.roles }}
|
||||
roles:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .syncWindows }}
|
||||
{{- with $projectData.syncWindows }}
|
||||
syncWindows:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .signatureKeys }}
|
||||
{{- with $projectData.signatureKeys }}
|
||||
signatureKeys:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .sourceNamespaces }}
|
||||
{{- with $projectData.sourceNamespaces }}
|
||||
sourceNamespaces:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# -- Deploy Argo CD Applications within this helm release
|
||||
# @default -- `[]` (See [values.yaml])
|
||||
# @default -- `{}` (See [values.yaml])
|
||||
## Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/
|
||||
applications: []
|
||||
# - name: guestbook
|
||||
applications: {}
|
||||
# guestbook:
|
||||
# namespace: argocd
|
||||
# additionalLabels: {}
|
||||
# additionalAnnotations: {}
|
||||
|
@ -43,10 +43,10 @@ applications: []
|
|||
# value: https://argoproj.github.io/
|
||||
|
||||
# -- Deploy Argo CD Projects within this helm release
|
||||
# @default -- `[]` (See [values.yaml])
|
||||
# @default -- `{}` (See [values.yaml])
|
||||
## Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/
|
||||
projects: []
|
||||
# - name: guestbook
|
||||
projects: {}
|
||||
# guestbook:
|
||||
# namespace: argocd
|
||||
# additionalLabels: {}
|
||||
# additionalAnnotations: {}
|
||||
|
@ -90,10 +90,10 @@ projects: []
|
|||
# - argocd
|
||||
|
||||
# -- Deploy Argo CD ApplicationSets within this helm release
|
||||
# @default -- `[]` (See [values.yaml])
|
||||
# @default -- `{}` (See [values.yaml])
|
||||
## Ref: https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/
|
||||
applicationsets: []
|
||||
# - name: guestbook
|
||||
applicationsets: {}
|
||||
# guestbook:
|
||||
# namespace: argocd
|
||||
# additionalLabels: {}
|
||||
# additionalAnnotations: {}
|
||||
|
@ -238,11 +238,11 @@ itemTemplates: []
|
|||
# namespace: guestbook
|
||||
|
||||
# -- DEPRECATED - Please refer [Deprecation Notice](https://github.com/argoproj-labs/argocd-extensions?tab=readme-ov-file#deprecation-notice) for more info.
|
||||
# @default -- `[]` (See [values.yaml])
|
||||
# @default -- `{}` (See [values.yaml])
|
||||
## This function in tech preview stage, do expect unstability or breaking changes in newer versions. Bump image.tag if necessary.
|
||||
## Ref: https://github.com/argoproj-labs/argocd-extensions
|
||||
extensions: []
|
||||
# - name: example
|
||||
extensions: {}
|
||||
# example:
|
||||
# namespace: argocd
|
||||
# additionalLabels: {}
|
||||
# additionalAnnotations: {}
|
||||
|
|
Loading…
Reference in a new issue