KubeZero/charts/kubezero/templates/_app.yaml
2020-07-08 14:52:13 +01:00

35 lines
1020 B
YAML

{{- define "kubezero-app.app" }}
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ .name | lower }}
namespace: argocd
labels:
{{ include "kubezero-lib.labels" .root | indent 4 }}
{{- if not .retain }}
finalizers:
- resources-finalizer.argocd.argoproj.io
{{- end }}
spec:
project: kubezero
source:
repoURL: {{ .root.Values.global.defaultSource.repoURL }}
targetRevision: {{ .root.Values.global.defaultSource.targetRevision }}
{{- if eq .type "helm" }}
{{- $my_values := index .root.Values .name "values" }}
path: {{ .root.Values.global.defaultSource.pathPrefix}}charts/kubezero-{{ .name }}
{{- if $my_values }}
helm:
values: |
{{- toYaml $my_values | nindent 8 }}
{{- end }}
{{- else }}
path: {{ .root.Values.global.defaultSource.pathPrefix }}artifacts/kubezero-{{ .name }}
{{- end }}
destination:
server: {{ .root.Values.global.defaultDestination.server }}
namespace: {{ default "kube-system" .namespace }}
{{- end }}