43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
{{- define "kubezero.app" }}
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: {{ .name | lower }}
|
|
namespace: argocd
|
|
labels:
|
|
app.kubernetes.io/name: {{ .name }}
|
|
helm.sh/chart: {{ .root.Chart.Name }}-{{ .root.Chart.Version | replace "+" "_" }}
|
|
app.kubernetes.io/managed-by: {{ .root.Release.Service }}
|
|
app.kubernetes.io/part-of: kubezero
|
|
{{- if not .retain }}
|
|
finalizers:
|
|
- resources-finalizer.argocd.argoproj.io
|
|
{{ end }}
|
|
spec:
|
|
project: kubezero
|
|
|
|
source:
|
|
repoURL: {{ default .root.Values.defaultSource.repoURL }}
|
|
targetRevision: {{ default .root.Values.defaultSource.targetRevision }}
|
|
{{- if eq .type "helm" }}
|
|
{{ $my_values := index .root.Values .name "values" }}
|
|
path: {{ default .root.Values.defaultSource.pathPrefix }}charts/kubezero-{{ .name }}
|
|
{{- if $my_values }}
|
|
helm:
|
|
values: |
|
|
{{- toYaml $my_values | nindent 8 }}
|
|
{{- end }}
|
|
{{- else }}
|
|
path: {{ default .root.Values.defaultSource.pathPrefix }}artifacts/kubezero-{{ .name }}
|
|
{{- end }}
|
|
|
|
destination:
|
|
server: {{ default .root.Values.defaultDestination.server }}
|
|
namespace: {{ default "kube-system" .namespace }}
|
|
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: false
|
|
{{- end }}
|