Skip to content

[LFXV2-1166] Add pod disruption budget support#36

Open
bramwelt wants to merge 3 commits intomainfrom
tbramwell/LFXV2-1166-pod-disruption-budget
Open

[LFXV2-1166] Add pod disruption budget support#36
bramwelt wants to merge 3 commits intomainfrom
tbramwell/LFXV2-1166-pod-disruption-budget

Conversation

@bramwelt
Copy link
Contributor

@bramwelt bramwelt commented Mar 6, 2026

Summary

  • Add podDisruptionBudget values to Helm chart (disabled by default)
  • Create PodDisruptionBudget template supporting minAvailable and maxUnavailable

🤖 Generated with Claude Code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Issue: LFXV2-1166
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Copilot AI review requested due to automatic review settings March 6, 2026 18:44
@bramwelt bramwelt requested a review from a team as a code owner March 6, 2026 18:44
@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9cd5efd1-f58a-4c7a-b8a2-1502d4fd12fd

📥 Commits

Reviewing files that changed from the base of the PR and between 354678b and d971368.

📒 Files selected for processing (2)
  • charts/lfx-v2-query-service/templates/pdb.yaml
  • charts/lfx-v2-query-service/values.yaml

Walkthrough

Introduces PodDisruptionBudget configuration to the lfx-v2-query-service Helm chart through a new template and values schema. The template conditionally creates a PodDisruptionBudget resource with validation to prevent simultaneous configuration of both minAvailable and maxUnavailable fields.

Changes

Cohort / File(s) Summary
PodDisruptionBudget Configuration
charts/lfx-v2-query-service/templates/pdb.yaml, charts/lfx-v2-query-service/values.yaml
New PDB template with conditional field selection and mutual exclusivity validation; values schema adds podDisruptionBudget.enabled (default false), with commented minAvailable and maxUnavailable options. Template validates that only one of minAvailable or maxUnavailable is set.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding pod disruption budget support to the Helm chart.
Description check ✅ Passed The description directly relates to the changeset, outlining the addition of podDisruptionBudget values and template creation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tbramwell/LFXV2-1166-pod-disruption-budget

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds optional PodDisruptionBudget (PDB) support to the lfx-v2-query-service Helm chart so operators can limit voluntary disruptions during node drains/rollouts.

Changes:

  • Introduces podDisruptionBudget configuration in values.yaml (disabled by default).
  • Adds a templates/pdb.yaml manifest that renders a policy/v1 PodDisruptionBudget with minAvailable / maxUnavailable.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
charts/lfx-v2-query-service/values.yaml Adds user-facing values for enabling/configuring the PDB.
charts/lfx-v2-query-service/templates/pdb.yaml Adds the PDB Kubernetes manifest template gated by a values flag.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +14 to +19
{{- with .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ . }}
{{- end }}
{{- with .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ . }}
{{- end }}
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When podDisruptionBudget.enabled is true, this template can render an invalid PodDisruptionBudget if neither minAvailable nor maxUnavailable is set, and it can also render an invalid spec if both are set at the same time. Add template validation (e.g., fail/required logic) to enforce that exactly one of these fields is provided whenever the PDB is enabled.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +9
# minAvailable: 1
# maxUnavailable: 1
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The values comments suggest both minAvailable and maxUnavailable are configurable, but Kubernetes requires exactly one of them to be set for a PodDisruptionBudget. Consider adding a brief note here (and/or explicit null defaults) clarifying that when enabled, users must set exactly one of these fields.

Suggested change
# minAvailable: 1
# maxUnavailable: 1
# When enabled, you must set exactly one of minAvailable or maxUnavailable.
minAvailable: null
maxUnavailable: null

Copilot uses AI. Check for mistakes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Issue: LFXV2-1166
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
asithade
asithade previously approved these changes Mar 6, 2026
Copy link
Contributor

@asithade asithade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants