From 9f73097c2648c40801b48ffdf80de27915b65376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20F=2E=20C=C3=A2ndido?= Date: Tue, 26 Mar 2024 10:24:27 -0300 Subject: [PATCH] fix: updating pdb for k8s 1.24+ --- addons/elasticsearch/templates/poddisruptionbudget.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/elasticsearch/templates/poddisruptionbudget.yaml b/addons/elasticsearch/templates/poddisruptionbudget.yaml index df6c74ecb..9d6d4f446 100644 --- a/addons/elasticsearch/templates/poddisruptionbudget.yaml +++ b/addons/elasticsearch/templates/poddisruptionbudget.yaml @@ -1,6 +1,10 @@ --- {{- if .Values.maxUnavailable }} +{{- if $.Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }} +apiVersion: policy/v1 +{{- else }} apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: name: "{{ template "elasticsearch.uname" . }}-pdb"