Skip to content

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

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

[LFXV2-1166] Add pod disruption budget support#46
bramwelt wants to merge 4 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>
@bramwelt bramwelt requested a review from a team as a code owner March 6, 2026 18:44
Copilot AI review requested due to automatic review settings March 6, 2026 18:44
@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

Walkthrough

Introduces PodDisruptionBudget support to the lfx-v2-indexer-service Helm chart through a new template file with validation logic and corresponding configuration values, conditionally rendering the resource when enabled.

Changes

Cohort / File(s) Summary
PodDisruptionBudget Configuration
charts/lfx-v2-indexer-service/templates/pdb.yaml, charts/lfx-v2-indexer-service/values.yaml
Adds PodDisruptionBudget Helm template with validation logic preventing simultaneous minAvailable and maxUnavailable configuration, plus default disabled settings in values with placeholder configuration options.

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 specifically describes the main change: adding pod disruption budget support to the Helm chart.
Description check ✅ Passed The description accurately relates to the changeset, outlining the two main additions: podDisruptionBudget values and the PodDisruptionBudget template.
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-indexer-service Helm chart so operators can configure disruption limits via values.

Changes:

  • Introduces podDisruptionBudget values (disabled by default) in the chart values.
  • Adds a new PodDisruptionBudget template that can render minAvailable or maxUnavailable.

Reviewed changes

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

File Description
charts/lfx-v2-indexer-service/values.yaml Adds configurable podDisruptionBudget values (enabled flag + knobs).
charts/lfx-v2-indexer-service/templates/pdb.yaml Adds a PDB manifest gated behind podDisruptionBudget.enabled.

💡 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.

minAvailable and maxUnavailable are mutually exclusive for PodDisruptionBudgets; if a user sets both values, this template will render both fields and Kubernetes will reject the manifest. Add a guard/validation to prevent both from being set at the same time (and provide a clear error message).

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

@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

🤖 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>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@charts/lfx-v2-indexer-service/templates/pdb.yaml`:
- Around line 10-16: The PDB template hard-codes namespace and the app label;
update templates/pdb.yaml to reference values instead of literal strings by
replacing the namespace and selector.matchLabels.app with {{ .Values.namespace
}} and {{ .Values.appLabel }}, add corresponding keys (namespace and appLabel)
to values.yaml with appropriate defaults (e.g., "lfx" and
"lfx-v2-indexer-service"), and ensure deployment.yaml uses the same
.Values.appLabel for its pod labels/selector so the PDB selector exactly matches
the Deployment selector.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0de12a5b-3442-48e5-ba7a-7804bd6844a0

📥 Commits

Reviewing files that changed from the base of the PR and between d55b1ea and 8d90d13.

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

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