Skip to content

fix: add hostname annotation to DO load balancer

Matjaz Gregoric requested to merge mtyaka/SE-5535-add-loadbalancer-hostname into main

Description

In order for pods to be able to communicate through the Load Balancer on DigitalOcean, one has to assign up a hostname to the LB and make all DNS records pointing to instances inside the cluster CNAMEs that point to the Load Balancer hostname.

Testing instructions

Testing is rather involved because it requires setting up a Grove instance with a custom hostname and modifying DNS records.

  1. Set up a grove instance with a custom hostname
  2. Set up the hostname with an A DNS record pointing to the LB IP.
  3. Run kubectl run -n<your-instance-ns> curl -it --rm --restart=Never --image curlimages/curl -- https://<your-custom-domain>
  4. Verify that it fails with an curl: (35) Recv failure: Connection reset by peer error
  5. Now apply the changes from this MR, and replace the DNS records with a CNAME pointing to the cluster hostname.
    1. Run kubectl run -n<your-instance-ns> curl -it --rm --restart=Never --image curlimages/curl -- https://<your-custom-domain> again
  6. Verify that it succeeds this time.

Checklist

If any of the items below is not applicable, do not remove them, but put a check in it.

  • All providers include the new feature/change
  • All affected providers can provision new clusters
  • Unit tests are added/updated
  • Documentation is added/updated
  • The TOOLS_CONTAINER_IMAGE_VERSION in ci_vars.yml is updated
  • The grove-template repository is updated
Edited by Matjaz Gregoric

Merge request reports