From e6ebd7f2d591a81fc052537762c7da62f413ed89 Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Fri, 6 Mar 2026 10:38:37 -0800 Subject: [PATCH 1/2] Add pod disruption budget support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Issue: LFXV2-1166 Co-Authored-By: Claude Opus 4.6 Signed-off-by: Trevor Bramwell --- .../templates/pdb.yaml | 20 +++++++++++++++++++ charts/lfx-v2-committee-service/values.yaml | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 charts/lfx-v2-committee-service/templates/pdb.yaml diff --git a/charts/lfx-v2-committee-service/templates/pdb.yaml b/charts/lfx-v2-committee-service/templates/pdb.yaml new file mode 100644 index 0000000..4af696f --- /dev/null +++ b/charts/lfx-v2-committee-service/templates/pdb.yaml @@ -0,0 +1,20 @@ +# Copyright The Linux Foundation and each contributor to LFX. +# SPDX-License-Identifier: MIT +{{- if .Values.podDisruptionBudget.enabled }} +--- +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ .Chart.Name }} + namespace: {{ .Release.Namespace }} +spec: + selector: + matchLabels: + app: {{ .Chart.Name }} + {{- with .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ . }} + {{- end }} + {{- with .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ . }} + {{- end }} +{{- end }} diff --git a/charts/lfx-v2-committee-service/values.yaml b/charts/lfx-v2-committee-service/values.yaml index bad3987..cd42229 100644 --- a/charts/lfx-v2-committee-service/values.yaml +++ b/charts/lfx-v2-committee-service/values.yaml @@ -4,6 +4,11 @@ # replicaCount is the number of replicas for the deployment replicaCount: 3 +podDisruptionBudget: + enabled: false + # minAvailable: 1 + # maxUnavailable: 1 + # image is the configuration for the container images image: # repository is the container image repository From d70a012c536ab1dbbb485150181848542a4fe124 Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Fri, 6 Mar 2026 10:56:07 -0800 Subject: [PATCH 2/2] Add PDB validation and zero-value support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Issue: LFXV2-1166 Co-Authored-By: Claude Opus 4.6 Signed-off-by: Trevor Bramwell --- charts/lfx-v2-committee-service/templates/pdb.yaml | 11 +++++++---- charts/lfx-v2-committee-service/values.yaml | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/charts/lfx-v2-committee-service/templates/pdb.yaml b/charts/lfx-v2-committee-service/templates/pdb.yaml index 4af696f..0c8f2aa 100644 --- a/charts/lfx-v2-committee-service/templates/pdb.yaml +++ b/charts/lfx-v2-committee-service/templates/pdb.yaml @@ -1,6 +1,9 @@ # Copyright The Linux Foundation and each contributor to LFX. # SPDX-License-Identifier: MIT {{- if .Values.podDisruptionBudget.enabled }} +{{- if and (hasKey .Values.podDisruptionBudget "minAvailable") (hasKey .Values.podDisruptionBudget "maxUnavailable") }} + {{- fail "podDisruptionBudget: cannot set both minAvailable and maxUnavailable" }} +{{- end }} --- apiVersion: policy/v1 kind: PodDisruptionBudget @@ -11,10 +14,10 @@ spec: selector: matchLabels: app: {{ .Chart.Name }} - {{- with .Values.podDisruptionBudget.minAvailable }} - minAvailable: {{ . }} + {{- if hasKey .Values.podDisruptionBudget "minAvailable" }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} {{- end }} - {{- with .Values.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ . }} + {{- if hasKey .Values.podDisruptionBudget "maxUnavailable" }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} {{- end }} {{- end }} diff --git a/charts/lfx-v2-committee-service/values.yaml b/charts/lfx-v2-committee-service/values.yaml index cd42229..306ef2e 100644 --- a/charts/lfx-v2-committee-service/values.yaml +++ b/charts/lfx-v2-committee-service/values.yaml @@ -4,6 +4,8 @@ # replicaCount is the number of replicas for the deployment replicaCount: 3 +# podDisruptionBudget configures a PodDisruptionBudget for the deployment. +# Only one of minAvailable or maxUnavailable may be set (not both). podDisruptionBudget: enabled: false # minAvailable: 1