blob: dbb065ffab547f20efcbeac47b1f874e320dd701 [file] [log] [blame]
Mohammed Naserb8eccd22023-02-10 05:55:56 +00001{{/*
2Define the clusterName as defaulting to the release namespace
3*/}}
4{{- define "clusterName" -}}
5{{ .Values.clusterName | default .Release.Namespace }}
6{{- end }}
7
8{{/*
9Return the target Kubernetes version.
10*/}}
11{{- define "capabilities.kubeVersion" -}}
12{{- default .Capabilities.KubeVersion.Version .Values.kubeVersion -}}
13{{- end }}
14
15{{/*
16Return the appropriate apiVersion for ingress.
17*/}}
18{{- define "capabilities.ingress.apiVersion" -}}
19{{- if semverCompare "<1.19-0" (include "capabilities.kubeVersion" .) -}}
20{{- print "networking.k8s.io/v1beta1" -}}
21{{- else -}}
22{{- print "networking.k8s.io/v1" -}}
23{{- end }}
24{{- end }}