From fe44df4f81ad1283fab1a1f5f98859c1404d713c Mon Sep 17 00:00:00 2001 From: Mikhail Advani Date: Wed, 5 Oct 2022 20:48:08 +0200 Subject: [PATCH] Support for pdb apiVersion policy/v1 (#329) --- charts/pomerium/Chart.yaml | 2 +- charts/pomerium/templates/authenticate-pdb.yaml | 4 ++++ charts/pomerium/templates/authorize-pdb.yaml | 4 ++++ charts/pomerium/templates/databroker-pdb.yaml | 4 ++++ charts/pomerium/templates/proxy-pdb.yaml | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/charts/pomerium/Chart.yaml b/charts/pomerium/Chart.yaml index 1c4e324e..b90b2709 100644 --- a/charts/pomerium/Chart.yaml +++ b/charts/pomerium/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: pomerium -version: 32.0.6 +version: 32.1.0 appVersion: v0.18.0 home: http://www.pomerium.com/ icon: https://www.pomerium.com/img/icon.svg diff --git a/charts/pomerium/templates/authenticate-pdb.yaml b/charts/pomerium/templates/authenticate-pdb.yaml index 6b8e2866..9a77b6cb 100644 --- a/charts/pomerium/templates/authenticate-pdb.yaml +++ b/charts/pomerium/templates/authenticate-pdb.yaml @@ -1,5 +1,9 @@ {{- if .Values.authenticate.pdb.enabled -}} +{{- if .Capabilities.APIVersions.Has "policy/v1" -}} +apiVersion: policy/v1 +{{- else -}} apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: labels: diff --git a/charts/pomerium/templates/authorize-pdb.yaml b/charts/pomerium/templates/authorize-pdb.yaml index d8489a9a..73b71244 100644 --- a/charts/pomerium/templates/authorize-pdb.yaml +++ b/charts/pomerium/templates/authorize-pdb.yaml @@ -1,5 +1,9 @@ {{- if .Values.authorize.pdb.enabled -}} +{{- if .Capabilities.APIVersions.Has "policy/v1" -}} +apiVersion: policy/v1 +{{- else -}} apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: labels: diff --git a/charts/pomerium/templates/databroker-pdb.yaml b/charts/pomerium/templates/databroker-pdb.yaml index 5d7c1340..c995ea1c 100644 --- a/charts/pomerium/templates/databroker-pdb.yaml +++ b/charts/pomerium/templates/databroker-pdb.yaml @@ -1,5 +1,9 @@ {{- if .Values.databroker.pdb.enabled -}} +{{- if .Capabilities.APIVersions.Has "policy/v1" -}} +apiVersion: policy/v1 +{{- else -}} apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: labels: diff --git a/charts/pomerium/templates/proxy-pdb.yaml b/charts/pomerium/templates/proxy-pdb.yaml index a6f829df..63b9b837 100644 --- a/charts/pomerium/templates/proxy-pdb.yaml +++ b/charts/pomerium/templates/proxy-pdb.yaml @@ -1,5 +1,9 @@ {{- if .Values.proxy.pdb.enabled -}} +{{- if .Capabilities.APIVersions.Has "policy/v1" -}} +apiVersion: policy/v1 +{{- else -}} apiVersion: policy/v1beta1 +{{- end }} kind: PodDisruptionBudget metadata: labels: