Skip to content

Pause child resources based on device reachability and phase#290

Open
felix-kaestner wants to merge 3 commits intomainfrom
device
Open

Pause child resources based on device reachability and phase#290
felix-kaestner wants to merge 3 commits intomainfrom
device

Conversation

@felix-kaestner
Copy link
Copy Markdown
Contributor

@felix-kaestner felix-kaestner commented Apr 9, 2026

Summary

  • Introduce a dedicated Reachable condition on the Device that tracks connectivity independently from Ready. When the controller cannot connect, Reachable=False and Ready=Unknown (per K8s API conventions: state is unobservable, not definitively unhealthy). A HeartbeatInterval flag governs periodic requeuing.
  • Extend computeCondition in internal/paused to pause child resources when the device is unreachable (Reachable != True) or not in the Running phase, in addition to the existing spec.paused check.
  • Update all Device watch predicates across the resource controllers to use a new DevicePausedChanged helper, so child resources are paused promptly on reachability or phase changes rather than waiting for the next periodic requeue.

@felix-kaestner felix-kaestner requested a review from a team as a code owner April 9, 2026 07:29
@felix-kaestner felix-kaestner changed the title Pause child resources based on device reachability and phaseDevice Pause child resources based on device reachability and phase Apr 9, 2026
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Apr 9, 2026
@hardikdr hardikdr added this to Roadmap Apr 9, 2026
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.
@felix-kaestner felix-kaestner force-pushed the device branch 2 times, most recently from 684c43f to 8b2c74d Compare April 9, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants