We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c28e2f6 commit 3bc6fe5Copy full SHA for 3bc6fe5
deploy/charts/vault-operator/templates/_helpers.tpl
@@ -1,4 +1,24 @@
1
{{/* vim: set filetype=mustache: */}}
2
+
3
+{{/*
4
+Return the target Kubernetes version
5
+*/}}
6
+{{- define "common.capabilities.kubeVersion" -}}
7
+{{- default (default .Capabilities.KubeVersion.Version .Values.kubeVersion) ((.Values.global).kubeVersion) -}}
8
+{{- end -}}
9
10
11
+Return the appropriate apiVersion for poddisruptionbudget.
12
13
+{{- define "common.capabilities.policy.apiVersion" -}}
14
+{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
15
+{{- if and (not (empty $kubeVersion)) (semverCompare "<1.21-0" $kubeVersion) -}}
16
+{{- print "policy/v1beta1" -}}
17
+{{- else -}}
18
+{{- print "policy/v1" -}}
19
20
21
22
{{/*
23
Expand the name of the chart.
24
*/}}
0 commit comments