diff --git a/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml b/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml index 6f73fa2223..e818b57a0d 100644 --- a/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml @@ -1,7 +1,7 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }} -apiVersion: policy/v1 -{{- else }} +{{- if not (.Capabilities.APIVersions.Has "policy/v1") }} apiVersion: policy/v1beta1 +{{- else }} +apiVersion: policy/v1 {{- end }} kind: PodDisruptionBudget metadata: