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
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue