Prefers longer prefixes in IPv6 only environments as default address, but keeps current behaviour everywhere else.
Why? (reasoning)
Talos IP preference strategy does not well in IPv6 Single-Stack environments as RA SLAAC addresses will be preferred over DHCPv6. In environments such as KubeVirt with Passt the SLAAC address is not routable by other Pods. If a DHCPv6 address is available it should be preferred.
The current filtering methods do not work as SLAAC and DHCPv6 address can be from the same prefix or in the case of KubeVirt a non-predictable pod IP.
This change only changes the preference in IPv6 only environments by adapting the default NodeAddress accordingly.
In the future it might be desirable to do a larger rewrite or even introduce CEL or expr to let the user define filtering and expression functions. As this is my first PR to Talos I kept the changes as minimal as possible.
See make help for a description of the available targets.
Unfortunately make fmt changed lots of *.proto files, so I did not include the changes.
make unit-tests did not run (might be a NixOS issue), but running relevant tests with go test passed.
make docs did not include relevant updates to the documentation.
Pull Request
What? (description)
Prefers longer prefixes in IPv6 only environments as default address, but keeps current behaviour everywhere else.
Why? (reasoning)
Talos IP preference strategy does not well in IPv6 Single-Stack environments as RA SLAAC addresses will be preferred over DHCPv6. In environments such as KubeVirt with Passt the SLAAC address is not routable by other Pods. If a DHCPv6 address is available it should be preferred.
The current filtering methods do not work as SLAAC and DHCPv6 address can be from the same prefix or in the case of KubeVirt a non-predictable pod IP.
This change only changes the preference in IPv6 only environments by adapting the default NodeAddress accordingly. In the future it might be desirable to do a larger rewrite or even introduce CEL or expr to let the user define filtering and expression functions. As this is my first PR to Talos I kept the changes as minimal as possible.
Fixes https://github.com/siderolabs/talos/issues/9725.
Acceptance
Please use the following checklist:
make conformance
)make fmt
)make lint
)make docs
)make unit-tests
)Unfortunately
make fmt
changed lots of*.proto
files, so I did not include the changes.make unit-tests
did not run (might be a NixOS issue), but running relevant tests withgo test
passed.make docs
did not include relevant updates to the documentation.