From a0a74fb43d147073e41aadc3d88660b312d6d638 Mon Sep 17 00:00:00 2001 From: Marco Kilchhofer Date: Thu, 3 Feb 2022 10:36:26 +0100 Subject: [PATCH] chore(argo-cd): Convert manifests of 'kind: List' to dashes separated documents (#1120) Signed-off-by: Marco Kilchhofer --- charts/argo-cd/Chart.yaml | 4 +- .../argocd-configs/applications.yaml | 86 +++++++------ .../templates/argocd-configs/projects.yaml | 116 +++++++++--------- 3 files changed, 99 insertions(+), 107 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 0188c7d7..50b0bcd3 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v2.2.3 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.33.1 +version: 3.33.2 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Fixed]: Consistent annotation quoting across all manifests" + - "[Changed]: Convert manifests of 'kind: List' to dashes separated documents." diff --git a/charts/argo-cd/templates/argocd-configs/applications.yaml b/charts/argo-cd/templates/argocd-configs/applications.yaml index d4d6171b..f40a259e 100644 --- a/charts/argo-cd/templates/argocd-configs/applications.yaml +++ b/charts/argo-cd/templates/argocd-configs/applications.yaml @@ -1,46 +1,42 @@ -{{- if .Values.server.additionalApplications }} -apiVersion: v1 -kind: List -items: - {{- range .Values.server.additionalApplications }} - - apiVersion: argoproj.io/v1alpha1 - kind: Application - metadata: - {{- with .additionalAnnotations }} - annotations: - {{- range $key, $value := . }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - {{- with .additionalLabels }} - labels: - {{- toYaml . | nindent 8 }} - {{- end }} - name: {{ .name }} - {{- with .namespace }} - namespace: {{ . }} - {{- end }} - {{- with .finalizers }} - finalizers: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - project: {{ tpl .project $ }} - source: - {{- toYaml .source | nindent 8 }} - destination: - {{- toYaml .destination | nindent 8 }} - {{- with .syncPolicy }} - syncPolicy: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .ignoreDifferences }} - ignoreDifferences: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .info }} - info: - {{- toYaml . | nindent 8 }} - {{- end }} +{{- range .Values.server.additionalApplications }} +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + {{- with .additionalAnnotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} {{- end }} -{{- end }} \ No newline at end of file + {{- with .additionalLabels }} + labels: + {{- toYaml . | nindent 8 }} + {{- end }} + name: {{ .name }} + {{- with .namespace }} + namespace: {{ . }} + {{- end }} + {{- with .finalizers }} + finalizers: + {{- toYaml . | nindent 8 }} + {{- end }} +spec: + project: {{ tpl .project $ }} + source: + {{- toYaml .source | nindent 8 }} + destination: + {{- toYaml .destination | nindent 8 }} + {{- with .syncPolicy }} + syncPolicy: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .ignoreDifferences }} + ignoreDifferences: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .info }} + info: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/charts/argo-cd/templates/argocd-configs/projects.yaml b/charts/argo-cd/templates/argocd-configs/projects.yaml index dd24c10f..74b674cd 100644 --- a/charts/argo-cd/templates/argocd-configs/projects.yaml +++ b/charts/argo-cd/templates/argocd-configs/projects.yaml @@ -1,62 +1,58 @@ -{{- if .Values.server.additionalProjects }} -apiVersion: v1 -kind: List -items: - {{- range .Values.server.additionalProjects }} - - apiVersion: argoproj.io/v1alpha1 - kind: AppProject - metadata: - {{- with .additionalAnnotations }} - annotations: - {{- range $key, $value := . }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - {{- with .additionalLabels }} - labels: - {{- toYaml . | nindent 8 }} - {{- end }} - name: {{ .name }} - {{- with .namespace }} - namespace: {{ . }} - {{- end }} - {{- with .finalizers }} - finalizers: - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - description: {{ .description }} - sourceRepos: - {{- toYaml .sourceRepos | nindent 8 }} - destinations: - {{- toYaml .destinations | nindent 8 }} - {{- with .clusterResourceWhitelist }} - clusterResourceWhitelist: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .namespaceResourceBlacklist }} - namespaceResourceBlacklist: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .namespaceResourceWhitelist }} - namespaceResourceWhitelist: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .orphanedResources }} - orphanedResources: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .roles }} - roles: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .syncWindows }} - syncWindows: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .signatureKeys }} - signatureKeys: - {{- toYaml . | nindent 8 }} - {{- end }} +{{- range .Values.server.additionalProjects }} +--- +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + {{- with .additionalAnnotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} + {{- with .additionalLabels }} + labels: + {{- toYaml . | nindent 8 }} + {{- end }} + name: {{ .name }} + {{- with .namespace }} + namespace: {{ . }} + {{- end }} + {{- with .finalizers }} + finalizers: + {{- toYaml . | nindent 8 }} + {{- end }} +spec: + description: {{ .description }} + sourceRepos: + {{- toYaml .sourceRepos | nindent 8 }} + destinations: + {{- toYaml .destinations | nindent 8 }} + {{- with .clusterResourceWhitelist }} + clusterResourceWhitelist: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .namespaceResourceBlacklist }} + namespaceResourceBlacklist: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .namespaceResourceWhitelist }} + namespaceResourceWhitelist: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .orphanedResources }} + orphanedResources: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .roles }} + roles: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .syncWindows }} + syncWindows: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .signatureKeys }} + signatureKeys: + {{- toYaml . | nindent 8 }} {{- end }} {{- end }}