This is an automated email from the ASF dual-hosted git repository.

gallardot pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git


The following commit(s) were added to refs/heads/master by this push:
     new d5a7358  [FIX] Add PDB support to latest kubernetes versions (#759)
d5a7358 is described below

commit d5a7358369e434d97ba6d749ccd832e508e2fc45
Author: Juan Enciso <juan.enc...@gmail.com>
AuthorDate: Fri Jun 7 04:41:56 2024 +0100

    [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 df8b796..d006cf9 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" . }}

Reply via email to