From 640ee83ae127c55a851abf7c24be3e3c3410f2cc Mon Sep 17 00:00:00 2001 From: Parichay Didwania Date: Tue, 6 Aug 2024 20:00:01 -0400 Subject: [PATCH 1/2] fix(helm): Allow pdb minAvailable to take precedence over default maxUnavailable --- charts/cluster-autoscaler/Chart.yaml | 2 +- charts/cluster-autoscaler/templates/pdb.yaml | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index 9f74a0b55186..cf644d91ba24 100644 --- a/charts/cluster-autoscaler/Chart.yaml +++ b/charts/cluster-autoscaler/Chart.yaml @@ -11,4 +11,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.37.0 +version: 9.37.1 diff --git a/charts/cluster-autoscaler/templates/pdb.yaml b/charts/cluster-autoscaler/templates/pdb.yaml index 8ad782096b12..75e00ebed416 100644 --- a/charts/cluster-autoscaler/templates/pdb.yaml +++ b/charts/cluster-autoscaler/templates/pdb.yaml @@ -10,7 +10,10 @@ spec: selector: matchLabels: {{ include "cluster-autoscaler.instance-name" . | indent 6 }} -{{- if .Values.podDisruptionBudget }} - {{ toYaml .Values.podDisruptionBudget | nindent 2 }} -{{- end }} + {{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if and .Values.podDisruptionBudget.maxUnavailable (not .Values.podDisruptionBudget.minAvailable) }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + {{- end }} {{- end -}} From e02f66516681fd5d076f7925fd7040e866156346 Mon Sep 17 00:00:00 2001 From: Parichay <47176112+ParichayDidwania@users.noreply.github.com> Date: Sun, 9 Feb 2025 19:14:01 -0500 Subject: [PATCH 2/2] Update Chart.yaml --- charts/cluster-autoscaler/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cluster-autoscaler/Chart.yaml b/charts/cluster-autoscaler/Chart.yaml index dc5eee6f50b8..764e2f6d9342 100644 --- a/charts/cluster-autoscaler/Chart.yaml +++ b/charts/cluster-autoscaler/Chart.yaml @@ -11,4 +11,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.46.1 \ No newline at end of file +version: 9.46.1