2020-05-05 14:21:09 +00:00
|
|
|
{{- define "kubezero.app" }}
|
|
|
|
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:
|
|
|
|
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
|
|
|
|
spec:
|
|
|
|
project: kubezero
|
|
|
|
|
|
|
|
source:
|
|
|
|
repoURL: {{ default .root.Values.defaultSource.repoURL }}
|
|
|
|
targetRevision: {{ default .root.Values.defaultSource.targetRevision }}
|
|
|
|
{{- if eq .type "helm" }}
|
2020-05-06 14:47:51 +00:00
|
|
|
{{ $values := index .root.Values .name "values" }}
|
2020-05-05 14:21:09 +00:00
|
|
|
path: {{ default .root.Values.defaultSource.pathPrefix }}charts/{{ .name }}
|
2020-05-06 14:47:51 +00:00
|
|
|
{{- if $values }}
|
|
|
|
helm:
|
|
|
|
values:
|
|
|
|
{{- toYaml $values | nindent 8 }}
|
|
|
|
{{- end }}
|
2020-05-05 14:21:09 +00:00
|
|
|
{{- else }}
|
|
|
|
path: {{ default .root.Values.defaultSource.pathPrefix }}artifacts/{{ .name }}
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
destination:
|
|
|
|
server: {{ default .root.Values.defaultDestination.server }}
|
|
|
|
namespace: kube-system
|
|
|
|
{{- end }}
|