Skip to content

chart: default_addresses_by_gateway should mirror addresses_by_link scope filter #167

@lexfrei

Description

@lexfrei

talm.discovered.addresses_by_link (charts/talm/templates/_helpers.tpl:564) rejects host / link / nowhere-scoped addresses. The legacy v1.11 sibling talm.discovered.default_addresses_by_gateway (line 152) filters only the host scope, so a link-local 169.254/16 entry on the default-gateway link could land verbatim in the rendered machine.network.interfaces[].addresses block.

Real Talos COSI always sets scope=link for that range, so the divergence is latent — but the two helpers should apply the same filter for symmetry and to stay easy to reason about together.

Fix

Hoist a shared $skipScopes := list "host" "link" "nowhere" and apply identically in both helpers. Pin with a contract test that renders a fixture with a link-scoped 169.254/16 entry on the default-gateway link and asserts it does not appear in the rendered legacy output.

Reference: PR #163 review, flagged as non-blocking (pre-existing asymmetry in the legacy path; #163 added the malformed-CIDR filter to both helpers but did not align the scope filter).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/chartIssues or PRs related to charts/ (Chart.yaml, helpers, templates)kind/cleanupCategorizes issue or PR as related to cleanup of code, process, or technical debtpriority/backlogGeneral backlog priority. Lower than priority/important-longterm

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions