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