You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(helpers): add per-link discovery helpers for multi-NIC templates
The existing default_*_by_gateway helpers expose only the primary link (the
one carrying the default route). Templates targeting nodes with secondary
NICs — a storage uplink on a control-plane, a second public link, etc. — had
no way to enumerate every physical NIC or read addresses, gateway, MAC, or
bus path by link name.
Add the following helpers under talm.discovered:
- physical_links: JSON list of physical NIC names (eno|eth|enp|enx|ens with
a busPath)
- configurable_links: physical NICs plus bond/vlan/bridge top-level links
- addresses_by_link: JSON list of CIDRs configured on the link, excluding
host scope
- gateway_by_link: scalar gateway IP for the default route on the link, in
the main table
- routes_by_link: JSON list of non-default routes on the link as flat
{dst, gateway, family, table, priority} objects
- mac_by_link, bus_by_link: scalar accessors
- link_selector_by_name: YAML 'busPath: ...' fragment for use as a Talos
deviceSelector
Default cozystack/generic templates are unchanged; the new helpers are
building blocks for user templates.
Refs #125
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
0 commit comments