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:
irizzant 2024-03-23 16:38:56 +01:00 committed by GitHub
parent 393402cb1b
commit 237493a4ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 428 additions and 429 deletions

View file

@ -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 }}