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
Minor fix in KAS LB HealthCheck #2656
Minor fix in KAS LB HealthCheck #2656
Conversation
/retest |
if len(svc.Status.LoadBalancer.Ingress) == 0 || svc.Status.LoadBalancer.Ingress[0].Hostname == "" && | ||
svc.Status.LoadBalancer.Ingress[0].IP == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this read something like this?
if len(svc.Status.LoadBalancer.Ingress) == 0 ||
(svc.Status.LoadBalancer.Ingress[0].Hostname == "" && svc.Status.LoadBalancer.Ingress[0].IP == "") {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i moved the AND clause to the same line, but the parenthesis is not necessary in this case, due to order of operations.
Not all cloud provider load balancer provisioners populate the Hostname field in the service.status.loadBalancer.ingress Some cloud providers (e.g. Azure, GCP, MetalLB) have load balancers that their ingress points are IP-based, not hostname-based. This PR changes the kube apiserver load balancer healthcheck to accomodate for IP-based ingress points as well. This fixes in issue where in some providers, the hosted cluster is successfully created but it has not completed due to a misleading 'APIServer load balancer is not provisioned' message. Signed-off-by: Oren Cohen <ocohen@redhat.com>
c6761d5
to
133d98c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidvossel, orenc1 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@orenc1: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Not all cloud provider load balancer provisioners populate the Hostname field in the service.status.loadBalancer.ingress Some cloud providers (e.g. Azure, GCP, MetalLB) have load balancers that their ingress points are IP-based, not hostname-based. This PR changes the kube apiserver load balancer healthcheck to accomodate for IP-based ingress points as well. This fixes in issue where in some providers, the hosted cluster is successfully created but it has not completed due to a misleading 'APIServer load balancer is not provisioned' message.
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, use
fixes #<issue_number>(, fixes #<issue_number>, ...)
format, where issue_number might be a GitHub issue, or a Jira story:Fixes #
Checklist