Conversation
|
Skipping CI for Draft Pull Request. |
Signed-off-by: Felix Breuer <f.breuer94@gmail.com>
43240d9 to
8e55bdc
Compare
Signed-off-by: Felix Breuer <f.breuer94@gmail.com>
Signed-off-by: Felix Breuer <f.breuer94@gmail.com>
a49eca5 to
2105a7e
Compare
Signed-off-by: Felix Breuer <f.breuer94@gmail.com>
Signed-off-by: Felix Breuer <f.breuer94@gmail.com>
|
In openstack this is done in the Route controller. Why do you want to do this here? |
This is done in the Openstack MCM. It takes the podNetworkCIDR and puts it into the AllowedAddressPairs. Thats why I also wanna do it in the STACKIT MCM. |
hown3d
left a comment
There was a problem hiding this comment.
overall good, some QOL changes.
|
|
||
| // AllowedAddresses are the IP address ranges (CIDRs) allowed to originate traffic from the server's network interface. | ||
| // Optional field. If specified, these ranges are configured as AllowedAddresses on the network interface of the server to bypass anti-spoofing rules. | ||
| AllowedAddresses []string `json:"allowedAddresses,omitempty"` |
There was a problem hiding this comment.
Should be part of NetworkingSpec
There was a problem hiding this comment.
I would not put that in NetworkingSpec since other MCM providers are also passing almost all config in the top level.
The NetworkingSpec has only 2 configuration options which are mutually exclusive. And even Networking is optional because if it is not set, the VM is put into the "default" network. So the Networking field has its own logic separate from the allowedAddresses.
| } | ||
| } | ||
|
|
||
| // Validate AllowedAddresses |
There was a problem hiding this comment.
move into validateNetworking function
pkg/provider/core.go
Outdated
|
|
||
| func (p *Provider) getServerByName(ctx context.Context, projectID, region, serverName string) (*Server, error) { | ||
| // Check if the server got already created | ||
| labelSelector := fmt.Sprintf("mcm.gardener.cloud/machine=%s", serverName) |
There was a problem hiding this comment.
Use constant StackitMachineLabel
There was a problem hiding this comment.
nit:
It was confusing that the labels are here put in as raw string with '=' concatination while in the request they were put in as map[string]string.
This is somewhat inconsistent. Labels should be used the same way across API requests.
There was a problem hiding this comment.
We have to refactor the labels anyways in another task so i would like to refactor them in another PR.
For the Labels... its the SDK ... but I changed our interface to consume a map and create the label string on the fly
There was a problem hiding this comment.
nit: Might be worth to separate functions into other files (e.g. network.go for network related functions).
Having a single core.go that will grow is not really clear to overlook in the long run.
There was a problem hiding this comment.
solve in another story
Signed-off-by: Felix Breuer <f.breuer94@gmail.com>
ef86c0c to
00165b0
Compare
Signed-off-by: Felix Breuer <f.breuer94@gmail.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hown3d The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
LGTM label has been added. DetailsGit tree hash: eebd653688f9351ee136c13890f4bd9dcab6df21 |
How to categorize this PR?
/kind enhancement
What this PR does / why we need it:
We need this MR in order to put the pod network CIDR into the allowedAddresses in the stackit MCM. Otherwise pod to pod communication does not work when using native kubernetes networking.
Special notes for your reviewer:
Breaking changes: