hcloud-cloud-controller-manager icon indicating copy to clipboard operation
hcloud-cloud-controller-manager copied to clipboard

LoadBalancer does not populate IP field when `disable-public-network` is set.

Open kwohlfahrt opened this issue 8 months ago • 3 comments

I have created a service of type LoadBalancer, with the annotation load-balancer.hetzner.cloud/disable-public-network: "true". The load-balancer has a private IP address assigned on my cluster's network (172.29.0.3), and responds correctly on this address. But, the status does not contain the LB's IP address:

  status:
    loadBalancer: {}

When I create a service without the annotation, the status is correctly updated:

  status:
    loadBalancer:
      ingress:
      - ip: 167.235.<snip>
      - ip: 2a01:4f8:<snip>

I think even if public access is disabled, the external IP should still be populated with the service's private network address, so that servers on my HCloud network (but outside the k8s cluster) can extract the address they can reach the service on. Also, without the load-balancer IP address, external-dns fails to add a record for this load-balancer.

kwohlfahrt avatar Nov 04 '23 21:11 kwohlfahrt

Yea, this seems to be an oversight. I will cleanup the responsible code and submit a fix to include the private IP if disable-public-network is set. In theory we could always set this if a private network is defined, but that should probably be gated behind a flag, to avoid breaking users with external-dns setups (and similiar).

apricote avatar Nov 30 '23 16:11 apricote

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

github-actions[bot] avatar Feb 29 '24 12:02 github-actions[bot]

Not stale, this issue persists with 1.19 of the CCM.

kwohlfahrt avatar Mar 04 '24 18:03 kwohlfahrt