secondary networks for servers - #185
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
3913699 to
d849c35
Compare
|
Looks fine, but tests are missing? |
|
I added some tests |
| return nil, status.Error(codes.Unavailable, fmt.Sprintf("failed to patch NICs for server: %v", err)) | ||
| } | ||
|
|
||
| if providerSpec.Networking != nil && len(providerSpec.Networking.SecondaryNetworkIDs) > 0 { |
There was a problem hiding this comment.
doesn't this has to happen before patching the networkinterfaces?
if this happens after patchNetworkInterface, the address from the new interface is not reflected in the CreateMachineResponse.Addresses and also it does not get the allowedAddresses patched.
This also means in the ensureAdditionalNetworks we have to attach the network and then wait until all networks are attached since this operation is async.
If we do not wait until all networks are attached, the patch function could skip some nics.
All this "waiting" feels a little cumbersome but its just how the create interface is designed. One call to rule em all.
There was a problem hiding this comment.
We should think about how we want to implement secondary networks in general.
In my idea, the primary network would be the one designed to route pod traffic. So this should be the only one where allowedAddresses are set to the pod CIDR.
Returning the address of the secondary network in the addresses might be something we want to do but also not want to use. These IPs are used by gardener for example to create SelfHostedShoot exposure resources.
Would a user want to use only the primary network for this or all networks where a server is attached to.
/cc @dergeberl
|
Our project currently lacks enough active contributors to adequately respond to all PRs.
You can:
/lifecycle stale |
|
/remove-lifecycle stale |
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
How to categorize this PR?
/kind enhancement
What this PR does / why we need it:
Support multiple additional networks for a server.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Breaking changes: