KubeZero/charts/kubezero-app/templates/_apps_common.yaml

43 lines
1.2 KiB
YAML
Raw Normal View History

{{- 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:
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" }}
path: {{ .root.Values.global.defaultSource.pathPrefix}}charts/kubezero-{{ .name }}
{{- if $my_values }}
helm:
2020-05-06 15:24:33 +00:00
values: |
{{- toYaml $my_values | nindent 8 }}
{{- end }}
{{- else }}
2020-05-15 09:38:06 +00:00
path: {{ .root.Values.global.defaultSource.pathPrefix }}artifacts/kubezero-{{ .name }}
{{- 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
selfHeal: false
{{- end }}