Skip to main content

Module floating_ip

Module floating_ip 

Source
Expand description

Provider-abstracted floating/reserved-IP mobility (R594-F5).

FloatingIpProvider is the domain-level trait each vendor adapter (HetznerFloatingIp, OvhFloatingIp, VultrFloatingIp — sibling modules in this directory) implements. reconcile_assignment is the shared idempotent + zone-checked core all three run through, so the “no-op when already assigned” / “reject a cross-zone move” behavior is written and tested exactly once instead of three times.

on_ingress_owner_changed is the Rust-level callable entry point for R594-F5’s ask: given the raft ingress_owner seam (oss/yubaba/crates/yubaba/src/raft/mod.rs’s YubabaRequest::SetIngressOwner / ClearIngressOwner, RaftAppState::ingress_owner) and the machine it currently names, command the provider floating IP to follow. Wiring this to fire automatically whenever ingress_owner transitions lives in the raft-apply / leadership-reconcile path (oss/yubaba/crates/yubaba/src/leader.rs), which is peer-owned and off-limits to this ticket — see on_ingress_owner_changed’s doc comment for the exact call site a follow-up should add. This is the same “mechanism now, wiring later” shape R594-F3 used for service records.

This mirrors, at the sovereign-ingress tier, the “external identity follows placement” property R591 names for Headscale via a Cloudflare Tunnel. R591 is peer-owned and gated on R570 (real multi-node raft HA); this module is not blocked on either — it builds directly on the ingress_owner seam, which already exists.

Structs§

FloatingIpAssignOutcome
Outcome of reconcile_assignment / on_ingress_owner_changed.
FloatingIpState
Current provider-side state of a floating/reserved IP.
FloatingIpTarget
A resolved reassign target: provider-native attach id + the mobility zone it lives in.

Traits§

FloatingIpProvider
One provider’s floating/reserved-IP transport + mobility policy.

Functions§

on_ingress_owner_changed
Callable entry point: react to the raft ingress_owner seam naming machine as the box that now owns public ingress, by commanding ip_id to follow it.
reconcile_assignment
Idempotent, zone-checked core shared by every provider adapter and by on_ingress_owner_changed.