[vFW_CNF_CDS] Update of python-sdk for vFW_CNF use case
[demo.git] / tutorials / ApacheCNF / templates / cba / Templates / k8s-configs / deployment-config / charts / common / templates / _capabilities.tpl
1 {{/* vim: set filetype=mustache: */}}
2 {{/*
3 Return the appropriate apiVersion for deployment.
4 */}}
5 {{- define "common.capabilities.deployment.apiVersion" -}}
6 {{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
7 {{- print "extensions/v1beta1" -}}
8 {{- else -}}
9 {{- print "apps/v1" -}}
10 {{- end -}}
11 {{- end -}}
12
13 {{/*
14 Return the appropriate apiVersion for statefulset.
15 */}}
16 {{- define "common.capabilities.statefulset.apiVersion" -}}
17 {{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
18 {{- print "apps/v1beta1" -}}
19 {{- else -}}
20 {{- print "apps/v1" -}}
21 {{- end -}}
22 {{- end -}}
23
24 {{/*
25 Return the appropriate apiVersion for ingress.
26 */}}
27 {{- define "common.capabilities.ingress.apiVersion" -}}
28 {{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
29 {{- print "extensions/v1beta1" -}}
30 {{- else -}}
31 {{- print "networking.k8s.io/v1beta1" -}}
32 {{- end -}}
33 {{- end -}}