KubeZero/charts/kubezero/templates/_app.yaml

42 lines
1.1 KiB
YAML
Raw Normal View History

2020-05-19 11:07:58 +00:00
{{- define "kubezero-app.app" }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ .name | lower }}
namespace: argocd
labels:
2020-05-19 11:07:58 +00:00
{{ include "kubezero-lib.labels" .root | indent 4 }}
{{- if not .retain }}
finalizers:
- resources-finalizer.argocd.argoproj.io
2020-07-05 22:42:23 +00:00
{{- end }}
spec:
project: kubezero
source:
2020-05-15 09:38:06 +00:00
repoURL: {{ .root.Values.global.defaultSource.repoURL }}
targetRevision: {{ .root.Values.global.defaultSource.targetRevision }}
{{- if eq .type "helm" }}
2020-05-15 09:38:06 +00:00
{{- $my_values := index .root.Values .name "values" }}
2020-07-05 22:42:23 +00:00
path: {{ .root.Values.global.defaultSource.pathPrefix}}charts/kubezero-{{ default .name .path }}
{{- if $my_values }}
helm:
2020-05-06 15:24:33 +00:00
values: |
{{- toYaml $my_values | nindent 8 }}
{{- end }}
{{- else }}
2020-07-05 22:42:23 +00:00
path: {{ .root.Values.global.defaultSource.pathPrefix }}artifacts/kubezero-{{ default .name .path }}
{{- 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 }}
syncPolicy:
automated:
prune: true
{{- if .selfheal }}
selfHeal: true
{{- end }}
{{- end }}