Bump PDB API version to v1 (#7421)

* update pdb to v1

Signed-off-by: yuswift <yuswift2018@gmail.com>

* validate the version in PDB

Signed-off-by: yuswift <yuswift2018@gmail.com>
This commit is contained in:
Swift 2021-08-05 20:23:22 +08:00 committed by GitHub
parent eb5c38d636
commit b1a71adb74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1,5 +1,5 @@
{{- if or (and .Values.controller.autoscaling.enabled (gt (.Values.controller.autoscaling.minReplicas | int) 1)) (and (not .Values.controller.autoscaling.enabled) (gt (.Values.controller.replicaCount | int) 1)) }}
apiVersion: policy/v1beta1
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
kind: PodDisruptionBudget
metadata:
labels:

View file

@ -1,5 +1,5 @@
{{- if or (gt (.Values.defaultBackend.replicaCount | int) 1) (gt (.Values.defaultBackend.autoscaling.minReplicas | int) 1) }}
apiVersion: policy/v1beta1
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
kind: PodDisruptionBudget
metadata:
labels: