• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 17787195909

17 Sep 2025 05:00AM UTC coverage: 44.242% (+0.3%) from 43.953%
17787195909

push

github

web-flow
feat(operator): Add MCPServer restart annotation support (#1882)

* feat(operator): add restart annotation support with rolling and immediate strategies

- Implement restart trigger via mcpserver.toolhive.stacklok.dev/restarted-at annotation (RFC3339 timestamp)
- Support optional mcpserver.toolhive.stacklok.dev/restart-strategy annotation (rolling or immediate)
- Rolling strategy updates deployment for zero-downtime restart (default)
- Immediate strategy deletes pods for fast restart
- Track last processed restart in status.lastRestartRequest to prevent duplicate restarts
- Update docs and examples to reflect new annotation format and usage

Signed-off-by: Ola Adebayo <34113844+olamide226@users.noreply.github.com>

* feat(operator): add comprehensive tests for restart annotation reconciliation

Add first test suite for MCPServer restart annotation logic in the operator controller.
Covers rolling and immediate restart strategies, including edge cases (invalid timestamp, already processed, missing resources, unknown strategy).

Signed-off-by: Ola Adebayo <34113844+olamide226@users.noreply.github.com>

* feat(operator): Add MCPServer restart annotation support

Add restart functionality via annotations without CRD schema changes:
- Support mcpserver.toolhive.stacklok.dev/restarted-at annotation (RFC3339 timestamp)
- Support mcpserver.toolhive.stacklok.dev/restart-strategy annotation (rolling/immediate)
- Rolling strategy triggers zero-downtime deployment update (default)
- Immediate strategy deletes pods for fast restart
- Track last processed restart in annotations to prevent duplicates
- Update documentation and examples for new annotation usage

Resolves operator restart requirements while maintaining backward compatibility.

Signed-off-by: Ola Adebayo <34113844+olamide226@users.noreply.github.com>

* test(operator): Enhance MCPServer restart annotation tests with error handling

Signed-off-by: Ola Adebayo <olamideadebayo2001@gmail.com>

---------

Si... (continued)

105 of 112 new or added lines in 1 file covered. (93.75%)

25 existing lines in 3 files now uncovered.

14784 of 33416 relevant lines covered (44.24%)

16.34 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.97
/cmd/thv-operator/controllers/mcpserver_controller.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc