2020-05-19 11:07:58 +00:00
|
|
|
{{- define "kubezero-app.app" }}
|
2020-05-05 14:21:09 +00:00
|
|
|
apiVersion: argoproj.io/v1alpha1
|
|
|
|
kind: Application
|
|
|
|
metadata:
|
2020-05-06 15:21:57 +00:00
|
|
|
name: {{ .name | lower }}
|
2020-05-05 14:21:09 +00:00
|
|
|
namespace: argocd
|
|
|
|
labels:
|
2020-05-19 11:07:58 +00:00
|
|
|
{{ include "kubezero-lib.labels" .root | indent 4 }}
|
2020-05-14 17:24:51 +00:00
|
|
|
{{- if not .retain }}
|
|
|
|
finalizers:
|
|
|
|
- resources-finalizer.argocd.argoproj.io
|
2020-07-05 22:42:23 +00:00
|
|
|
{{- end }}
|
2020-05-05 14:21:09 +00:00
|
|
|
spec:
|
|
|
|
project: kubezero
|
|
|
|
|
|
|
|
source:
|
2020-05-15 09:38:06 +00:00
|
|
|
repoURL: {{ .root.Values.global.defaultSource.repoURL }}
|
|
|
|
targetRevision: {{ .root.Values.global.defaultSource.targetRevision }}
|
2020-05-05 14:21:09 +00:00
|
|
|
{{- if eq .type "helm" }}
|
2020-05-15 09:38:06 +00:00
|
|
|
{{- $my_values := index .root.Values .name "values" }}
|
2020-07-06 11:32:24 +00:00
|
|
|
path: {{ .root.Values.global.defaultSource.pathPrefix}}charts/kubezero-{{ .name }}
|
2020-05-14 17:24:51 +00:00
|
|
|
{{- if $my_values }}
|
2020-05-06 14:47:51 +00:00
|
|
|
helm:
|
2020-05-06 15:24:33 +00:00
|
|
|
values: |
|
2020-05-14 17:24:51 +00:00
|
|
|
{{- toYaml $my_values | nindent 8 }}
|
2020-05-06 14:47:51 +00:00
|
|
|
{{- end }}
|
2020-05-05 14:21:09 +00:00
|
|
|
{{- else }}
|
2020-07-06 11:32:24 +00:00
|
|
|
path: {{ .root.Values.global.defaultSource.pathPrefix }}artifacts/kubezero-{{ .name }}
|
2020-05-05 14:21:09 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
destination:
|
2020-05-15 09:38:06 +00:00
|
|
|
server: {{ .root.Values.global.defaultDestination.server }}
|
2020-05-07 11:26:43 +00:00
|
|
|
namespace: {{ default "kube-system" .namespace }}
|
2020-08-20 10:40:08 +00:00
|
|
|
|
|
|
|
{{- if .root.Values.global.syncPolicy }}
|
|
|
|
syncPolicy:
|
|
|
|
{{- toYaml .root.Values.global.syncPolicy | nindent 4 }}
|
|
|
|
{{- end }}
|
2020-05-05 14:21:09 +00:00
|
|
|
{{- end }}
|