use PodDisruptionBudget API policy/v1 if available

Signed-off-by: Brian Dols <brian.dols@inky.com>
This commit is contained in:
Brian Dols
2023-08-10 23:26:09 -05:00
parent eee3607ab7
commit 0bdffc9e10
2 changed files with 8 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
{{- if .Values.podDisruptionBudget.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1" -}}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "flagger.name" . }}

View File

@@ -1,5 +1,9 @@
{{- if .Values.podDisruptionBudget.enabled }}
{{- if .Capabilities.APIVersions.Has "policy/v1" -}}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ include "loadtester.fullname" . }}