Skip to content

Stop passing the removed --mode flag to the sentinel - #7

Merged
kylan11 merged 2 commits into
mitis-cloud:mainfrom
0xmichalis:fix/sentinel-chart-args
Oct 19, 2026
Merged

kylan11 merged 2 commits into
mitis-cloud:mainfrom
0xmichalis:fix/sentinel-chart-args

Conversation

@0xmichalis

Copy link
Copy Markdown
Contributor

Summary

  • v0.4.0 removed the sentinel's --mode flag together with the janitor, but templates/sentinel.yaml still passes --mode=sentinel. With sentinel.enabled=true, every sentinel pod exits with code 2 during flag parsing and crash-loops:

    $ docker run --rm --network none --entrypoint /sentinel ghcr.io/kylan11/understudy:0.4.4 --mode=sentinel --cloud=auto --surge-on-rebalance=false
    flag provided but not defined: -mode
  • Drop the arg.

  • Add hack/check-chart-args.sh (make chart-args-check, run in the helm CI job). It renders the chart with the sentinel enabled and runs each binary with the args its container receives plus -h, so a flag removed from a binary but still rendered by the chart fails CI instead of crash-looping on install.

Verification

  • make chart-args-check fails on main (templates/sentinel.yaml passes sentinel args it does not accept, flag provided but not defined: -mode) and passes with this change.
  • make chart-check, helm lint charts/understudy and shellcheck hack/check-chart-args.sh: passed.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 17, 2026 19:44

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@kylan11

kylan11 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

thanks @0xmichalis for this fix and the accompanying reliability and security PRs; the regression coverage is much appreciated

I reproduced the sentinel startup failure and verified the fix. I added a small follow-up to the chart argument check: Helm render failures now propagate to the check, and unexpectedly empty argument lists are rejected. Previously, failure inside the process substitution could leave the script running only -h and incorrectly succeeding.

@kylan11
kylan11 merged commit b7bcce7 into mitis-cloud:main Oct 19, 2026
7 checks passed
@kylan11 kylan11 mentioned this pull request Oct 19, 2026
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