Skip to content

Commit

Permalink
fix(vault-operator helm chart): added missing common.capabilities.kub…
Browse files Browse the repository at this point in the history
…eVersion and common.capabilities.policy.apiVersion template definitions.
  • Loading branch information
virtyaluk committed Jul 9, 2024
1 parent d9466ea commit 8ab7b0a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions deploy/charts/vault-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
{{/* vim: set filetype=mustache: */}}

{{/*
Return the target Kubernetes version
*/}}
{{- define "common.capabilities.kubeVersion" -}}
{{- default (default .Capabilities.KubeVersion.Version .Values.kubeVersion) ((.Values.global).kubeVersion) -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for poddisruptionbudget.
*/}}
{{- define "common.capabilities.policy.apiVersion" -}}
{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}}
{{- if and (not (empty $kubeVersion)) (semverCompare "<1.21-0" $kubeVersion) -}}
{{- print "policy/v1beta1" -}}
{{- else -}}
{{- print "policy/v1" -}}
{{- end -}}
{{- end -}}

{{/*
Expand the name of the chart.
*/}}
Expand Down

0 comments on commit 8ab7b0a

Please # to comment.