argocd-helm/charts/argocd-apps/templates/projects.yaml
Zoltán Reegn a344d64fbd
fix(argocd-apps): don't render empty app description (#2911)
* fix(argocd-apps): don't render empty app description

Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com>

* chore: Apply suggestions from code review

Signed-off-by: Marco Maurer (-Kilchhofer) <mkilchhofer@users.noreply.github.com>

---------

Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com>
Signed-off-by: Marco Maurer (-Kilchhofer) <mkilchhofer@users.noreply.github.com>
Co-authored-by: Marco Maurer (-Kilchhofer) <mkilchhofer@users.noreply.github.com>
2024-09-11 06:55:38 +09:00

75 lines
2 KiB
YAML

{{- range $projectName, $projectData := .Values.projects }}
---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
{{- with $projectData.additionalAnnotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- with $projectData.additionalLabels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ $projectName }}
{{- with $projectData.namespace }}
namespace: {{ . }}
{{- end }}
{{- with $projectData.finalizers }}
finalizers:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with $projectData.permitOnlyProjectScopedClusters }}
permitOnlyProjectScopedClusters: {{ . }}
{{- end }}
{{- with $projectData.description }}
description: {{ . }}
{{- end }}
{{- with $projectData.sourceRepos }}
sourceRepos:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.destinations }}
destinations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.clusterResourceWhitelist }}
clusterResourceWhitelist:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.clusterResourceBlacklist }}
clusterResourceBlacklist:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.namespaceResourceBlacklist }}
namespaceResourceBlacklist:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.namespaceResourceWhitelist }}
namespaceResourceWhitelist:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.orphanedResources }}
orphanedResources:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.roles }}
roles:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.syncWindows }}
syncWindows:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.signatureKeys }}
signatureKeys:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $projectData.sourceNamespaces }}
sourceNamespaces:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}