GardenerNodeLifecycle: Base reconcile on Hypervisor CRD, not Node#325
GardenerNodeLifecycle: Base reconcile on Hypervisor CRD, not Node#325fwiesel wants to merge 3 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
1673f96 to
a2ee26b
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.
a2ee26b to
ed8f746
Compare
The eviction will now be triggered by the maintenance-operator, so drop setting the label. Watch the conditions on the hypervisor and manage the pods / deployments in kube-system to signal gardener that - the node is ready when the onboarding condition is completed - the node can be drained (and therefor terminated) if it has been evicted
- Add missing ctx SpecContext parameter to BeforeEach/It callbacks - Fix undefined variable references (podName -> maintenanceName, hypervisorName -> name) - Fix missing closing paren in It block - Qualify ConditionTypeOnboarding with kvmv1 package prefix - Add JustBeforeEach reconcile calls to PDB and deployment contexts so assertions run against actual controller output
ed8f746 to
e0a405b
Compare
Merging this branch will increase 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
|
Switches the
GardenerNodeLifecycleControllerto watch and reconcile theHypervisorCRD as its primary resource instead of theNode. This removes the need to label nodes and aligns the controller with the rest of the operator's ownership model.Includes updated controller tests.
Prerequisite for:
offboarding-ha-disabling-optional(#268).