Skip to content

feat: support pattern link aliases#12723

Closed
nberlee wants to merge 1 commit intosiderolabs:mainfrom
nberlee:main
Closed

feat: support pattern link aliases#12723
nberlee wants to merge 1 commit intosiderolabs:mainfrom
nberlee:main

Conversation

@nberlee
Copy link
Contributor

@nberlee nberlee commented Feb 4, 2026

Pull Request

What? (description)

Add pattern-based LinkAliasConfig names (e.g. net%d) to create sequential aliases across multiple matching links, sorted by link name.

Why? (reasoning)

This matches the requested behavior for multi-link aliases, allowing one config to generate net0, net1, ... in deterministic order, with automatic reconciliation when links change. Closes #12718

Acceptance

Please use the following checklist:

  • you linked an issue (if applicable)
  • you included tests (if applicable)
  • you ran conformance (make conformance)
  • you formatted your code (make fmt)
  • you linted your code (make lint)
  • you generated documentation (make docs)
  • you ran unit-tests (make unit-tests)

See make help for a description of the available targets.

This adds two new selector options to `LinkAliasConfig`:

- `requireUniqueMatch` (default: true): When false, allows the selector
  to match multiple links and uses the first matching link.
- `skipAliasedLinks` (default: false): When true, skips links that
  already have an alias from a previous config.

These options enable creating sequential aliases like `net0` and `net1`
from any N random links, which is useful for bonding/bridging setups
where consistent interface naming is needed regardless of physical
hardware.

Example:
```yaml
apiVersion: v1alpha1
kind: LinkAliasConfig
name: net0
selector:
    match: link.type == 1
    requireUniqueMatch: false
---
apiVersion: v1alpha1
kind: LinkAliasConfig
name: net1
selector:
    match: link.type == 1
    requireUniqueMatch: false
    skipAliasedLinks: true
```

Closes siderolabs#12718

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
@github-project-automation github-project-automation bot moved this to To Do in Planning Feb 4, 2026
@talos-bot talos-bot moved this from To Do to In Review in Planning Feb 4, 2026
@nberlee nberlee marked this pull request as draft February 4, 2026 19:08
@smira smira moved this from In Review to On Hold in Planning Feb 9, 2026
@nberlee nberlee closed this Feb 15, 2026
@github-project-automation github-project-automation bot moved this from On Hold to Done in Planning Feb 15, 2026
@nberlee nberlee changed the title feat: add requireUniqueMatch and skipAliasedLinks to LinkAliasConfig feat: support pattern link aliases Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

BondConfig: need a way to select multiple links (link group / multi-link alias)

1 participant