diff --git a/charts/tempo-distributed/templates/_helpers.tpl b/charts/tempo-distributed/templates/_helpers.tpl index d6d38206fe..e4a0ca58a8 100644 --- a/charts/tempo-distributed/templates/_helpers.tpl +++ b/charts/tempo-distributed/templates/_helpers.tpl @@ -152,7 +152,11 @@ Return if ingress supports pathType. Return the appropriate apiVersion for PodDisruptionBudget. */}} {{- define "tempo.pdb.apiVersion" -}} -{{- print "policy/v1" -}} + {{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">=1.21-0" .Capabilities.KubeVersion.Version) -}} + {{- print "policy/v1" -}} + {{- else -}} + {{- print "policy/v1beta1" -}} + {{- end -}} {{- end -}} {{/*