stackitcloud / yawol

yawol is a Load Balancer solution for OpenStack, based on the Kubernetes controller pattern.
Apache License 2.0
44 stars 5 forks source link

Allow configuration of the subnet the LB is placed in #287

Closed malt3 closed 4 months ago

malt3 commented 7 months ago

This is an optional parameter that can either be left uninitialized to keep the old behavior or be set as a helm value or per LB.

We at edgeless systems have a use-case for yawol where we need the loadbalancer to be in the same network but a different subnet (cidr) than the kubernetes nodes. This is a requirement for the network encryption we are using in our clusters. Basically, we need to enforce that any traffic in the node subnet cidr belongs to a k8s node (and can thus enforce it to be encrypted). Loadbalancer traffic must therefore be part of a separate subnet.

dergeberl commented 7 months ago

Thanks for your contribution 🥳

Can you please add a test to check that createPort is correct if there is a subnet set and if there is no subnet set?

malt3 commented 7 months ago

Can you please add a test to check that createPort is correct if there is a subnet set and if there is no subnet set?

I added tests for the loadbalancermachine controller behavior. Please let me know if there is more testing needed!

dergeberl commented 7 months ago

I added tests for the loadbalancermachine controller behavior. Please let me know if there is more testing needed!

Can you please add one more test for the yawol-cloud-controller. To test that it also works that a subnet can be set via an annotation. Like this: https://github.com/stackitcloud/yawol/blob/19dcae4f7bee3a8f41275e26e1f0220fcfb8885e/controllers/yawol-cloud-controller/targetcontroller/service_controller_test.go#L2187

Kumm-Kai commented 4 months ago

Thanks for your contribution! ❤️