Skip to content

Commit 3bc6fe5

Browse files
authored
fix(vault-operator helm chart): added missing common.capabilities.kubeVersion and common.capabilities.policy.apiVersion template definitions. (#527)
Signed-off-by: virtyaluk <[email protected]>
1 parent c28e2f6 commit 3bc6fe5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

deploy/charts/vault-operator/templates/_helpers.tpl

+20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
{{/* 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+
{{- end -}}
20+
{{- end -}}
21+
222
{{/*
323
Expand the name of the chart.
424
*/}}

0 commit comments

Comments
 (0)