Link
Link custom resource schema.
The Link CRD represents a single point-to-point wire between two containerlab nodes. Each device
Pod's connectivity helper selects the links terminating on its own Nodes with field selectors on
endpoint node names (Kubernetes 1.31+).
Link
SPEC
LinkSpec is the spec for a Link resource -- the wire as the user drew it, nothing else. Anything operational (the allocated wire ID and resolved identities) lives in status, and current peer transport identity is derived by direct connectivity reconcilers.
-
EndpointA is the "a" side of this link.
-
InterfaceName is the name of the interface on the node this side of the link is on.
-
IPv4 is the optional IPv4 CIDR prefix containerlab assigns to this endpoint. It is cold-plan configuration for kinds that consume endpoint addresses; changing it on a realized Node requires recreation. It is invalid on the reserved host endpoint.
-
IPv6 is the optional IPv6 CIDR prefix containerlab assigns to this endpoint. It is cold-plan configuration for kinds that consume endpoint addresses; changing it on a realized Node requires recreation. It is invalid on the reserved host endpoint.
-
Netem is the link impairment of the packets this side of the link sends -- the same impairment containerlab's endpoint
netemkey declares. On a cross-Pod Link the peer Pod's connectivity sidecar programs it as the root qdisc of its sidecar leg, which these packets cross on their way to the peer, so it applies whatever the device does with its own interface. On a Link within one Pod, and on a host Link, the connectivity sidecar owning this endpoint programs it as the endpoint interface's root qdisc. The sidecar re-asserts it while the Pod runs, so it survives the interface being recreated. Changing it is always applied live.-
Corruption is the random packet corruption in percent -- i.e. 0.1 for 0.1%.
range: 0 to 100 -
Delay is the time packets are delayed by, as a Go duration -- i.e. 50ms. The connectivity sidecar programs the qdisc in 32-bit kernel ticks, which caps the delay at 4m.
-
Jitter is the delay variation, as a Go duration -- i.e. 5ms. It needs a positive delay, and the kernel caps it at 2.147483647s, so a longer jitter is rejected rather than silently capped.
-
Loss is the random packet loss in percent -- i.e. 0.5 for 0.5%.
range: 0 to 100 -
Rate is the rate limit in kbit/s. The maximum is the highest rate containerlab accepts, the highest one whose rate in bytes/s fits 64 bits; it is a rule rather than a schema maximum because the schema stores maximums as floats, which can't hold it exactly.
format: int64range: >= 0
-
-
NodeName is the name of the Node object (and therefore containerlab node) this side of the link resides on -- or the reserved name
hostfor a (node local) host link.
-
-
EndpointB is the "b" side of this link.
-
InterfaceName is the name of the interface on the node this side of the link is on.
-
IPv4 is the optional IPv4 CIDR prefix containerlab assigns to this endpoint. It is cold-plan configuration for kinds that consume endpoint addresses; changing it on a realized Node requires recreation. It is invalid on the reserved host endpoint.
-
IPv6 is the optional IPv6 CIDR prefix containerlab assigns to this endpoint. It is cold-plan configuration for kinds that consume endpoint addresses; changing it on a realized Node requires recreation. It is invalid on the reserved host endpoint.
-
Netem is the link impairment of the packets this side of the link sends -- the same impairment containerlab's endpoint
netemkey declares. On a cross-Pod Link the peer Pod's connectivity sidecar programs it as the root qdisc of its sidecar leg, which these packets cross on their way to the peer, so it applies whatever the device does with its own interface. On a Link within one Pod, and on a host Link, the connectivity sidecar owning this endpoint programs it as the endpoint interface's root qdisc. The sidecar re-asserts it while the Pod runs, so it survives the interface being recreated. Changing it is always applied live.-
Corruption is the random packet corruption in percent -- i.e. 0.1 for 0.1%.
range: 0 to 100 -
Delay is the time packets are delayed by, as a Go duration -- i.e. 50ms. The connectivity sidecar programs the qdisc in 32-bit kernel ticks, which caps the delay at 4m.
-
Jitter is the delay variation, as a Go duration -- i.e. 5ms. It needs a positive delay, and the kernel caps it at 2.147483647s, so a longer jitter is rejected rather than silently capped.
-
Loss is the random packet loss in percent -- i.e. 0.5 for 0.5%.
range: 0 to 100 -
Rate is the rate limit in kbit/s. The maximum is the highest rate containerlab accepts, the highest one whose rate in bytes/s fits 64 bits; it is a rule rather than a schema maximum because the schema stores maximums as floats, which can't hold it exactly.
format: int64range: >= 0
-
-
NodeName is the name of the Node object (and therefore containerlab node) this side of the link resides on -- or the reserved name
hostfor a (node local) host link.
-
-
MTU is the MTU for both direct endpoint interfaces; zero means unset.
STATUS
LinkStatus is the status for a Link resource.
-
Conditions contains bounded controller observations for this Link. It does not claim dataplane readiness, which remains observable through endpoint Node connectivity status.
-
Condition contains details for one aspect of the current state of this API Resource.
-
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format: date-time -
message is a human readable message indicating details about the transition. This may be an empty string.
-
observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
format: int64range: >= 0 -
reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
-
status of the condition, one of True, False, Unknown.
enum: "True", "False", "Unknown" -
type of condition in CamelCase or in foo.example.com/CamelCase.
-
-
-
ResolvedEndpoints identifies the exact Nodes to which this Link is bound. The controller sets both endpoints atomically after every non-host endpoint resolves. A host endpoint is recorded by name with an empty UID because it does not refer to a Node object.
-
WireID is the identity this link carries on the fabric wire between its two endpoint sidecars -- both sides of the link use the same id, and it is unique among the Links of this namespace (wire datagrams dispatch inside one receiving sidecar from a validated source, so cross-namespace uniqueness is meaningless). This is an allocation rather than user intent, hence it living in the status; zero means "not allocated (yet)" (direct connectivity reconcilers wait until the controller has filled the ID in).
range: 0 to 16000000