OCPBUGS-31679: localnet, multi-homing: introduce localnet alias #4320
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What this PR does and why is it needed
This PR introduces a network name alias to use when configuring the localnet networks.
By using this alias, the user can create multiple networks - on different vlans - without having to reconfigure the node's OVN bridge mappings. Essentially, the use can provide a single mapping and piggy-back multiple physical configurations in it.
Users in OpenShift use kubernetes-nmstate to configure these mappings; this way, they get to skip provisioning multiple policies.
- Special notes for reviewers
In this PR we are adding an alias to the network name attribute in the localnet logical switch port mandatory options.
By doing that, we can create multiple networks pointing at the same OVS bridge without having to provision additional bridge mappings, which provides a leaner and more focuses user workflow since any time the admin wants to define a new VLAN, all they need to do is to create a NetworkAttachmentDefinition (and re-use the existing binding).
This would be the new secondary networks definitions:
- How to verify it
Provision workloads ataching to those networks, and check the OVS databases contents:
We'll still see multiple patch ports (one per network) while using a single mapping - localnet
tenantblue
to bridgebreth0
.- Description for the changelog
Introduce a localnet network name alias, which allows OVN bridge mapping re-use.