fix(chart): keep scheduler livenessProbe inside the kubeScheduler container guard - #2977
Conversation
…tainer guard The livenessProbe block for the kube-scheduler container rendered after that container's closing end, so with kubeScheduler.enabled false and livenessProbe true it landed as a bare mapping key under containers, which breaks helm template with a YAML parse error. Move it back inside the guard. Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe deployment template now renders the kube-scheduler ChangesScheduler deployment rendering
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The chart now renders the kube-scheduler probe only with its container, preventing invalid or misattached probe configuration for disabled kube-scheduler deployments. No current merge-blocking risk remains. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/lgtm |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FouoF, magic-peach The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
What type of PR is this?
/kind bug
What this PR does / why we need it:
The scheduler deployment template renders the
livenessProbeblock after the{{- end }}that closes thekubeScheduler.enabledguard, so it's indented as if still part of thekube-schedulercontainer but has no container list item above it whenkubeScheduler.enabledis false. Withscheduler.livenessProbe=trueandscheduler.kubeScheduler.enabled=false,helm templatefails with a YAML parse error instead of rendering a valid manifest. This moves the block back inside the guard so the probe only renders when the container it targets exists.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Verified with
helm template hami charts/hami --set scheduler.livenessProbe=true --set scheduler.kubeScheduler.enabled=falsebefore and after: before, the command fails withyaml: line 44: did not find expected key; after, it renders successfully. Also verified with both flags true that the probe still nests correctly under thekube-schedulercontainer, andhelm lintpasses. No open issue or PR found covering this.Does this PR introduce a user-facing change?:
Fixes a chart render failure when
scheduler.kubeScheduler.enabled=falseandscheduler.livenessProbe=trueare combined; no behavior change at default values.This PR was written primarily by Claude Code, an AI assistant, under my direction and review. I verified the fix by reproducing the render failure and confirming it is resolved, and reviewed the diff before submitting.
Summary by CodeRabbit