From d5a7358369e434d97ba6d749ccd832e508e2fc45 Mon Sep 17 00:00:00 2001 From: Juan Enciso Date: Fri, 7 Jun 2024 04:41:56 +0100 Subject: [PATCH] [FIX] Add PDB support to latest kubernetes versions (#759) --- charts/apisix/templates/pdb.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/apisix/templates/pdb.yaml b/charts/apisix/templates/pdb.yaml index df8b7966..d006cf9c 100644 --- a/charts/apisix/templates/pdb.yaml +++ b/charts/apisix/templates/pdb.yaml @@ -15,7 +15,11 @@ # limitations under the License. {{- if (.Values.podDisruptionBudget.enabled) }} +{{ if semverCompare "<1.21-0" .Capabilities.KubeVersion.Version -}} apiVersion: policy/v1beta1 +{{- else -}} +apiVersion: policy/v1 +{{- end }} kind: PodDisruptionBudget metadata: name: {{ include "apisix.fullname" . }}