Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service detail page: Show loadbalancer ip or hostname from the service status #6246

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

bashofmann
Copy link
Contributor

@bashofmann bashofmann commented Jun 29, 2022

Summary

Service detail page: Show loadbalancer ip or hostname from the service status, if the spec field is empty

Fixes #6245

Occurred changes and/or fixed issues

Currently the external IP is only shown, if it was defined in the Service spec. In most cases the external IP or hostname of a LoadBalancer Service is automatically assigned by the cloud provider though. In that case spec.loadBalancerIP is empty. But you can see the assigned information in status.loadBalancer.ingress.

This PR shows the information from the status if the spec field is empty.

Technical notes summary

A lot of cloud providers assign a IP address to a load balancer service (e.g. AKS), but some assign a hostname (e.g. EKS).

Areas or cases that should be tested

Service detail page for services of type LoadBalancer, e.g. in an AKS, EKS or GKE cluster.

Areas which could experience regressions

Service detail page.

Screenshot/Video

Example on AKS
Bildschirmfoto 2022-06-29 um 12 02 42

Example on EKS
Bildschirmfoto 2022-06-29 um 12 05 26

@catherineluse
Copy link
Contributor

LGTM

To test this PR,

  1. I provisioned an RKE2 cluster with the Amazon cloud provider enabled
  2. In cluster explorer, created a Service of type LoadBalancer without loadBalancerIP in the spec.
  3. On the Service detail page, confirmed that the Load Balancer value in the header was taken from the Service's status.loadBalancer.ingress.hostname
  4. Edited the Service YAML and set spec.loadBalancerIPto SomeText
  5. Went to the Service detail page and confirmed that the LoadBalancer value was SomeText

@catherineluse catherineluse merged commit bae76d7 into rancher:master Jun 29, 2022
@bashofmann bashofmann deleted the service-lb-ip branch June 30, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Service detail page does not always show load balancer ip
2 participants