hcloud-cloud-controller-manager
hcloud-cloud-controller-manager copied to clipboard
Specify private ip for loadbalancer
Allows users to specify the IPv4 of the load balancer in the private network via the annotation "load-balancer.hetzner.cloud/private-ipv4"
Removes network logic from main load balancer creation, since the API does not support specifying the IP address there, and moves network logic to exclusively happen in AttachToNetwork and DetachFromNetwork.
I also added an extra LoadBalancer refresh in the main reconciliation loop, since changing the IP address of an SVC object causes network detach and subsequent attach, which in turn needs to cause the targets to be re-added to loadbalancer if they were private network targets.
Unit tests pass and i have tested this in a few scenarios on a cluster of my own.