Skip to content

feat: add topologySpreadConstraints to Helm chart#58

Merged
dealako merged 2 commits into
mainfrom
feat/LFXV2-1167-topology-spread-constraints
Jun 16, 2026
Merged

feat: add topologySpreadConstraints to Helm chart#58
dealako merged 2 commits into
mainfrom
feat/LFXV2-1167-topology-spread-constraints

Conversation

@bramwelt

Copy link
Copy Markdown
Contributor

Summary

  • Add topologySpreadConstraints: [] to values.yaml (empty default, no-op unless overridden)
  • Add conditional {{- with .Values.topologySpreadConstraints }} block to deployment.yaml at the pod spec level

Test plan

  • helm lint passes with no errors
  • helm template with empty default produces no topologySpreadConstraints block
  • helm template with constraints set renders correctly at pod spec level

Context

Part of LFXV2-1167: add topology spread constraints to all LFX v2 services so pods spread across nodes and availability zones, preventing a single node drain from taking out all replicas.

🤖 Generated with Claude Code

Add passthrough topologySpreadConstraints value (empty list by
default) to the Helm chart, rendered conditionally in the
deployment template at the pod spec level.

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

Issue: LFXV2-1167
Co-Authored-By: Claude Sonnet 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 June 11, 2026 17:56
Copilot AI review requested due to automatic review settings June 11, 2026 17:56
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

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: 7376f8ca-a484-43a0-a05b-143c0b8af276

📥 Commits

Reviewing files that changed from the base of the PR and between d33a24b and 540e391.

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

Walkthrough

This PR adds optional topology spread constraints support to the lfx-v2-query-service Helm chart. A new topologySpreadConstraints value is defined with documentation and an empty default, and a corresponding conditional block is added to the deployment pod spec to render these constraints when configured.

Changes

Topology Spread Constraints Configuration

Layer / File(s) Summary
Topology spread constraints configuration and deployment template
charts/lfx-v2-query-service/values.yaml, charts/lfx-v2-query-service/templates/deployment.yaml
Values.yaml defines topologySpreadConstraints with default empty list and documentation explaining pod distribution across failure domains. Deployment.yaml conditionally renders this configuration in the pod spec using toYaml when the value is set.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add topologySpreadConstraints to Helm chart' accurately summarizes the main change, which is adding topologySpreadConstraints support to the Helm chart.
Description check ✅ Passed The description clearly explains what was added (topologySpreadConstraints in values.yaml and deployment.yaml), includes a test plan with verification steps, and provides context about the feature's purpose.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/LFXV2-1167-topology-spread-constraints

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Helm chart for lfx-v2-query-service to support optional Kubernetes topologySpreadConstraints at the pod spec level, enabling deployments to spread replicas across nodes/zones when configured while remaining a no-op by default.

Changes:

  • Add topologySpreadConstraints: [] to values.yaml with inline documentation and an example.
  • Render spec.template.spec.topologySpreadConstraints conditionally in templates/deployment.yaml only when non-empty.

Reviewed changes

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

File Description
charts/lfx-v2-query-service/values.yaml Introduces a documented topologySpreadConstraints value with an empty default to preserve current behavior.
charts/lfx-v2-query-service/templates/deployment.yaml Conditionally renders topologySpreadConstraints in the pod spec when configured.

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

@dealako dealako merged commit 5447b49 into main Jun 16, 2026
9 checks passed
@dealako dealako deleted the feat/LFXV2-1167-topology-spread-constraints branch June 16, 2026 18:25
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