From 7132555c71b45384551710222dbc68b9a3b044ff Mon Sep 17 00:00:00 2001 From: Drew Sirenko <68304519+AndrewSirenko@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:10:27 -0400 Subject: [PATCH] Add toggle for PodDisruptionBudget in chart --- .../templates/poddisruptionbudget-controller.yaml | 4 ++-- charts/aws-ebs-csi-driver/values.yaml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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.