-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path_common.tpl
More file actions
47 lines (44 loc) · 1.68 KB
/
Copy path_common.tpl
File metadata and controls
47 lines (44 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{{/*
Return the target Kubernetes version
*/}}
{{- define "library-chart.capabilities.kubeVersion" -}}
{{- (.Values.global).kubeVersion | default .Values.kubeVersion | default .Capabilities.KubeVersion.Version }}
{{- end -}}
{{/*
Return the URL at which the service can be accessed
*/}}
{{- define "library-chart.service-url" -}}
{{- if (.Values.ingress).enabled -}}
{{- printf "%s://%s" (.Values.ingress.tls | ternary "https" "http") .Values.ingress.hostname -}}
{{- else if (.Values.httproute).enabled -}}
{{- printf "https://%s" .Values.httproute.hostname -}}
{{- else if (.Values.route).enabled -}}
{{- printf "https://%s" .Values.route.hostname -}}
{{- end -}}
{{- end -}}
{{/*
Return the URL at which the service can be accessed
*/}}
{{- define "library-chart.sparkui-url" -}}
{{- if (.Values.spark).ui -}}
{{- if (.Values.ingress).enabled -}}
{{- printf "%s://%s" (.Values.ingress.tls | ternary "https" "http") .Values.spark.hostname -}}
{{- else if (.Values.httproute).enabled -}}
{{- printf "https://%s" .Values.spark.hostname -}}
{{- else if (.Values.route).enabled -}}
{{- printf "https://%s" .Values.spark.hostname -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Return the URL at which the user-defined custom port(s) can be accessed
*/}}
{{- define "library-chart.user-url" -}}
{{- if (.Values.ingress).enabled -}}
{{- printf "%s://%s" (.Values.ingress.tls | ternary "https" "http") .Values.ingress.userHostname -}}
{{- else if (.Values.httproute).enabled -}}
{{- printf "https://%s" .Values.httproute.userHostname -}}
{{- else if (.Values.route).enabled -}}
{{- printf "https://%s" .Values.route.userHostname -}}
{{- end -}}
{{- end -}}