feat(argo-cd): Add ability to pass finalizers to AppProject (#982)

* feat(argo-cd): Add ability to pass finalizers to AppProject

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

* chore: Use 'with' instead of 'if' and beautify indent style

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

* docs: Add finalizers to example in values.yaml

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
Marco Kilchhofer 2021-10-19 18:59:08 +02:00 committed by GitHub
parent fbea5aa49b
commit 694f8b4fe9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 25 deletions

View file

@ -2,53 +2,57 @@
apiVersion: v1
kind: List
items:
{{- range .Values.server.additionalProjects }}
{{- range .Values.server.additionalProjects }}
- apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
{{- if .additionalAnnotations }}
{{- with .additionalAnnotations }}
annotations:
{{- range $key, $value := .additionalAnnotations }}
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- if .additionalLabels }}
{{- with .additionalLabels }}
labels:
{{- toYaml .additionalLabels | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
name: {{ .name }}
{{- if .namespace }}
namespace: {{ .namespace }}
{{- with .namespace }}
namespace: {{ . }}
{{- end }}
{{- with .finalizers }}
finalizers:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
description: {{ .description }}
sourceRepos:
{{- toYaml .sourceRepos | nindent 8 }}
{{- toYaml .sourceRepos | nindent 8 }}
destinations:
{{- toYaml .destinations | nindent 8 }}
{{- if .clusterResourceWhitelist }}
{{- toYaml .destinations | nindent 8 }}
{{- with .clusterResourceWhitelist }}
clusterResourceWhitelist:
{{- toYaml .clusterResourceWhitelist | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .namespaceResourceBlacklist }}
{{- with .namespaceResourceBlacklist }}
namespaceResourceBlacklist:
{{- toYaml .namespaceResourceBlacklist | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .namespaceResourceWhitelist }}
{{- with .namespaceResourceWhitelist }}
namespaceResourceWhitelist:
{{- toYaml .namespaceResourceWhitelist | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .orphanedResources }}
{{- with .orphanedResources }}
orphanedResources:
{{- toYaml .orphanedResources | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .roles }}
{{- with .roles }}
roles:
{{- toYaml .roles | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .syncWindows }}
{{- with .syncWindows }}
syncWindows:
{{- toYaml .syncWindows | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}