From 85ff76e7b0b26a1398457482fadfc4d227481b5d Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Mon, 6 Feb 2023 06:50:45 +0100 Subject: [PATCH] fix(helm): use PodDisruptionBudget v1 for newer k8s versions (#16466) --- helm/minio/templates/poddisruptionbudget.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helm/minio/templates/poddisruptionbudget.yaml b/helm/minio/templates/poddisruptionbudget.yaml index 8037eb743..1fa4cf1fe 100644 --- a/helm/minio/templates/poddisruptionbudget.yaml +++ b/helm/minio/templates/poddisruptionbudget.yaml @@ -1,5 +1,9 @@ {{- if .Values.podDisruptionBudget.enabled }} +{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodDisruptionBudget") }} apiVersion: policy/v1beta1 +{{- else }} +apiVersion: policy/v1 +{{- end }} kind: PodDisruptionBudget metadata: name: minio @@ -11,4 +15,4 @@ spec: selector: matchLabels: app: {{ template "minio.name" . }} -{{- end }} \ No newline at end of file +{{- end }}