Skip to content

feat(mecak8s): add scheduler.enabled chart value - #2427

Merged
rdimitrov merged 1 commit into
mainfrom
rdimitrov/mecak8s-scheduler-flag
Oct 22, 2026
Merged

rdimitrov merged 1 commit into
mainfrom
rdimitrov/mecak8s-scheduler-flag

Conversation

@rdimitrov

Copy link
Copy Markdown
Member

Summary

Adds a scheduler.enabled value to the mecak8s chart (stacklok/stacklok-enterprise-platform#4848). It defaults to true, so existing installs render the same Deployment. With scheduler.enabled: false, the chart passes --no-scheduler to the agent. Until now the only way to turn the scheduler off was extraArgs.

The values comment and docs also state what turning it off means: schedules can still be created, listed, inspected, paused, resumed, and deleted, but nothing fires them. FireNow returns scheduler_not_running (FAILED_PRECONDITION). user-docs/features/sessions/scheduled-tasks.md used to say manual fires keep working with --no-scheduler. They don't (scheduleManager.FireNow needs the in-process scheduler), so that page is corrected too. The --no-scheduler help text in cmd/mecak8s and cmd/mecated makes the same claim. Changing it would regenerate the server CLI reference, so it's left for a separate change.

Not related to #2426. The two PRs can merge in either order.

Testing

  • TestMecak8sHelmChart_SchedulerEnabled: the default render has no --no-scheduler, and scheduler.enabled=false renders it.
  • TestMecak8sHelmChart_NewValuesAreSchemaValidated now rejects a non-boolean scheduler.enabled and unknown scheduler.* keys.
  • The full chart Go tests and task deploy:helm-unittest pass (71 tests). golangci-lint reports 0 issues on the chart package. task docs is clean.
  • Local Kind (mecatl-dev, 2 replicas): after helm upgrade --set scheduler.enabled=false, the new pods no longer log scheduler: enabled. CreateSchedule and ListSchedules still work, and FireNow returns FailedPrecondition: scheduler is not running. Setting it back to true restores leader election.

API compatibility

  • Assessment: no wire API change. This adds an optional chart value whose default keeps current behavior.
  • Upgrade implications: none. An existing extraArgs: [--no-scheduler] keeps working.

🤖 Generated with Claude Code

Render --no-scheduler when scheduler.enabled is false. The default stays
true, so existing installs are unchanged. Document that disabling the
scheduler also stops manual fires (FireNow returns scheduler_not_running),
correcting the scheduled-tasks page that said they keep working.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rdimitrov
rdimitrov force-pushed the rdimitrov/mecak8s-scheduler-flag branch from 34b3b04 to 58537d5 Compare October 22, 2026 12:22
@rdimitrov
rdimitrov merged commit ef06193 into main Oct 22, 2026
41 checks passed
@rdimitrov
rdimitrov deleted the rdimitrov/mecak8s-scheduler-flag branch October 22, 2026 15:33
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 23, 2026
2 tasks

This branch was successfully deployed

1 active deployment
Preview — 58537d54 Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request kubernetes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant