feat(argocd-apps)!: use maps instead of lists

Signed-off-by: irizzant <i.rizzante@gmail.com>
This commit is contained in:
irizzant 2024-02-21 21:31:43 +00:00
parent 43337b5e14
commit 402af475f4
14 changed files with 423 additions and 418 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: 1.6.1
version: 2.0.0
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
keywords:

View file

@ -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. |
| 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 |
| 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 | object | `{}` (See [values.yaml]) | Deploy Argo CD Applications/ApplicationSets/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)

View file

@ -1,7 +1,7 @@
# Test with multi-source applications
applications:
- name: argocd-application-multiple-sources
argocd-application-multiple-sources:
additionalLabels: {}
additionalAnnotations: {}
finalizers:

View file

@ -1,7 +1,7 @@
# Test with applications
applications:
- name: argocd-application
argocd-application:
additionalLabels: {}
additionalAnnotations: {}
finalizers:

View file

@ -1,7 +1,7 @@
# Test with multi-source applicationsets
applicationsets:
- name: applicationset-multiple-sources
applicationset-multiple-sources:
generators:
- list:
elements:

View file

@ -1,7 +1,7 @@
# Test applicationsets with Progressive Syncs
applicationsets:
- name: applicationset-progressive-syncs
applicationset-progressive-syncs:
generators:
- list:
elements:

View file

@ -1,7 +1,7 @@
# Test with applicationsets
applicationsets:
- name: applicationset
applicationset:
additionalLabels: {}
additionalAnnotations: {}
# See PR #10026 (ArgoCD v2.5 or later)
@ -46,7 +46,7 @@ applicationsets:
syncPolicy:
# Set Application finalizer
preserveResourcesOnDeletion: false
- name: applicationset-list-generator
applicationset-list-generator:
generators:
- list:
elements:

View file

@ -1,5 +1,6 @@
itemTemplates:
- items:
first:
items:
- name: my-appset
generators: &generators
- list:
@ -29,7 +30,8 @@ itemTemplates:
destination:
server: "{{`{{cluster}}`}}"
namespace: guestbook
- items:
second:
items:
- name: my-appset
generators:
- list:

View file

@ -1,9 +1,9 @@
{{- range .Values.applications }}
{{- range $k, $v := .Values.applications }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
{{- with .additionalAnnotations }}
{{- with $v.additionalAnnotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
@ -13,7 +13,7 @@ metadata:
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ .name }}
name: {{ $k }}
{{- with .namespace }}
namespace: {{ . }}
{{- end }}

View file

@ -1,5 +1,5 @@
{{- range .Values.applicationsets }}
{{- range $k, $v := .Values.applicationsets }}
---
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
@ -14,7 +14,7 @@ metadata:
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ .name }}
name: {{ $k }}
{{- with .namespace }}
namespace: {{ . }}
{{- end }}

View file

@ -1,9 +1,9 @@
{{- range .Values.extensions }}
{{- range $k, $v := .Values.extensions }}
---
apiVersion: argoproj.io/v1alpha1
kind: ArgoCDExtension
metadata:
name: {{ .name }}
name: {{ $k }}
{{- with .namespace }}
namespace: {{ . }}
{{- end }}

View file

@ -1,4 +1,4 @@
{{- range .Values.itemTemplates }}
{{- range $k, $v := .Values.itemTemplates }}
{{- if kindIs "string" .template }}
{{- $template := .template -}}
{{- range .items }}

View file

@ -1,4 +1,4 @@
{{- range .Values.projects }}
{{- range $k, $v := .Values.projects }}
---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
@ -13,7 +13,7 @@ metadata:
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ .name }}
name: {{ $k }}
{{- with .namespace }}
namespace: {{ . }}
{{- end }}

View file

@ -1,8 +1,8 @@
# -- Deploy Argo CD Applications within this helm release
# @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: {}
@ -45,8 +45,8 @@ applications: []
# -- Deploy Argo CD Projects within this helm release
# @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: {}
@ -92,8 +92,8 @@ projects: []
# -- Deploy Argo CD ApplicationSets within this helm release
# @default -- `[]` (See [values.yaml])
## Ref: https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/
applicationsets: []
# - name: guestbook
applicationsets: {}
# guestbook:
# namespace: argocd
# additionalLabels: {}
# additionalAnnotations: {}
@ -161,8 +161,9 @@ applicationsets: []
# -- Deploy Argo CD Applications/ApplicationSets/Projects within this helm release
# @default -- `[]` (See [values.yaml])
## Ref: https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/
itemTemplates: []
# - items:
itemTemplates: {}
# first:
# items:
# - name: my-appset
# generators: &generators
# - list:
@ -192,7 +193,8 @@ itemTemplates: []
# destination:
# server: "{{`{{cluster}}`}}"
# namespace: guestbook
# - items:
# second:
# items:
# - name: my-appset
# generators:
# - list:
@ -227,13 +229,14 @@ itemTemplates: []
# @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
# namespace: argocd
# additionalLabels: {}
# additionalAnnotations: {}
# sources:
# - git:
# url: https://github.com/argoproj-labs/argocd-example-extension.git
# - web:
# url: https://github.com/argoproj-labs/argocd-example-extension/releases/download/v0.1.0/extension.tar
extensions: {}
# example:
# namespace: argocd
# additionalLabels: {}
# additionalAnnotations: {}
# sources:
# - git:
# url: https://github.com/argoproj-labs/argocd-example-extension.git
# - web:
# url: https://github.com/argoproj-labs/argocd-example-extension/releases/download/v0.1.0/extension.tar
#