diff --git a/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml b/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml index 36fed9bc39..979a18a11a 100644 --- a/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml @@ -1,4 +1,4 @@ -{{- if not .Values.nodeComponentOnly -}} +{{- if and .Values.controller.podDisruptionBudget.enabled (not .Values.nodeComponentOnly) -}} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: @@ -16,4 +16,4 @@ spec: {{- else }} minAvailable: 2 {{- end }} -{{- end }} +{{- end -}} diff --git a/charts/aws-ebs-csi-driver/values.yaml b/charts/aws-ebs-csi-driver/values.yaml index 6089d83518..ac4a19ae08 100644 --- a/charts/aws-ebs-csi-driver/values.yaml +++ b/charts/aws-ebs-csi-driver/values.yaml @@ -245,6 +245,10 @@ controller: deploymentAnnotations: {} podAnnotations: {} podLabels: {} + podDisruptionBudget: + # Warning: Disabling PodDisruptionBudget may lead to delays in stateful workloads starting due to controller + # pod restarts or evictions. + enabled: true priorityClassName: system-cluster-critical # AWS region to use. If not specified then the region will be looked up via the AWS EC2 metadata # service.