Pause child resources based on device reachability and phase#290
Open
felix-kaestner wants to merge 3 commits intomainfrom
Open
Pause child resources based on device reachability and phase#290felix-kaestner wants to merge 3 commits intomainfrom
felix-kaestner wants to merge 3 commits intomainfrom
Conversation
Introduce a dedicated Reachable condition on the Device resource that tracks connectivity independently from the Ready condition. When the controller cannot connect to the device, Reachable is set to False and Ready is set to Unknown (per K8s API conventions: the device state is unobservable, not definitively unhealthy). On successful connection, Reachable is set to True and reconciliation proceeds normally.
The paused package now pauses child resources when the device's Reachable condition is not True. Update all child controller Device watch predicates to also trigger on Reachable condition status changes, so child resources are paused promptly when the device becomes unreachable rather than waiting for the next periodic requeue. Extract DevicePausedChanged helper to internal/paused to centralize the predicate logic alongside the pause decision itself.
Extend computeCondition to pause child resources when the device's status.phase is non-empty and not Running. This covers the Pending, Provisioning, Provisioned, and Failed phases. Extend DevicePausedChanged to trigger on phase transitions that cross the Running/non-Running boundary, so child controllers react promptly.
684c43f to
8b2c74d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary