33 lines
909 B
Smarty
Executable file
33 lines
909 B
Smarty
Executable file
{{/* vim: set filetype=mustache: */}}
|
|
{{/*
|
|
Return the appropriate apiVersion for deployment.
|
|
*/}}
|
|
{{- define "common.capabilities.deployment.apiVersion" -}}
|
|
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
{{- print "extensions/v1beta1" -}}
|
|
{{- else -}}
|
|
{{- print "apps/v1" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Return the appropriate apiVersion for statefulset.
|
|
*/}}
|
|
{{- define "common.capabilities.statefulset.apiVersion" -}}
|
|
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
{{- print "apps/v1beta1" -}}
|
|
{{- else -}}
|
|
{{- print "apps/v1" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Return the appropriate apiVersion for ingress.
|
|
*/}}
|
|
{{- define "common.capabilities.ingress.apiVersion" -}}
|
|
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
{{- print "extensions/v1beta1" -}}
|
|
{{- else -}}
|
|
{{- print "networking.k8s.io/v1beta1" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|