mirror of
https://github.com/clearml/clearml-helm-charts
synced 2025-02-08 13:48:19 +00:00
36 lines
1023 B
Smarty
36 lines
1023 B
Smarty
|
{{/* 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 if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}}
|
||
|
{{- print "networking.k8s.io/v1beta1" -}}
|
||
|
{{- else -}}
|
||
|
{{- print "networking.k8s.io/v1" -}}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|