HypervisorController: also detect termination via Node deletion timestamp#334
HypervisorController: also detect termination via Node deletion timestamp#334fwiesel wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe controller now treats a Node deletion timestamp as an additional termination trigger, propagating it to Hypervisor status and maintenance state. Documentation and controller tests were updated to reflect the standardized terminating reason and new trigger. ChangesNode termination propagation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Node
participant HypervisorController
participant Hypervisor
Node->>HypervisorController: terminating condition or deletionTimestamp
HypervisorController->>Hypervisor: set Terminating=True
HypervisorController->>Hypervisor: set maintenance=Termination on creation
Possibly related PRs
Suggested reviewers: 🚥 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/controller/hypervisor_controller_test.go`:
- Around line 321-333: Fix gofmt formatting in
internal/controller/hypervisor_controller_test.go: align the “and the Hypervisor
resource does exists” Context with its sibling Context nested under the parent
Context, and indent the blocks around lines 368-403 and 633-640 to the correct
nesting level inside their respective test blocks. Run gofmt on the file and
verify the formatting check passes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a92c27a9-0019-4460-975b-bbd909e746c2
📒 Files selected for processing (3)
api/v1/hypervisor_types.gointernal/controller/hypervisor_controller.gointernal/controller/hypervisor_controller_test.go
625a902 to
2c802f9
Compare
…tamp Gardener is moving away from setting a Terminating node condition and will instead simply delete the Node. Add node.deletionTimestamp as a second trigger for the Terminating condition on the Hypervisor, alongside the existing legacy node condition check. Both inputs produce the same result: ConditionTypeTerminating=True with ConditionReasonTerminating. The same dual-check is applied to the Spec.Maintenance seeding on first Hypervisor creation, so a node that is already being deleted when its Hypervisor CR is first created correctly enters MaintenanceTermination.
2c802f9 to
12e7b6b
Compare
Merging this branch will not change overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
Gardener is moving away from setting a
Terminatingnode condition and will instead simply delete the Node.Add
node.deletionTimestampas a second trigger forConditionTypeTerminatingon the Hypervisor, alongside the existing node condition check. Both paths write the sameConditionReasonTerminatingreason.The same dual-check is applied to
Spec.Maintenance = MaintenanceTerminationseeding at Hypervisor creation time.