-
Notifications
You must be signed in to change notification settings - Fork 3.4k
service: respond to healthchecks on LBips #26728
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
Conversation
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.
docs (autogenerated) ok
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.
Thanks for the PR @nberlee, I left a cosmetic comment but other than that Helm changes LGTM.
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.
Thanks for the update @nberlee, Helm changes LGTM now.
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.
Few nits, but other than that implementation looks good to me.
I would however like to see a test for this. It should be fairly straightforward to add to
pkg/service/service_test.go
. TestHealthCheckNodePort
is likely a good starting point.
Remember to restore option.Config.EnableHealthCheckLoadBalancerIP
after the test case.
@joamaki I agree that a test would be nice, but its not straightforward for me when it come to mocking |
@joamaki friendly reminder :) |
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.
agent changes lgtm 👍 nice work!
Great that the PR is approved, could anymody issue a |
/test |
This commit introduces the 'EnableHealthCheckLoadBalancerIP', which exposes the healthCheckNodePort on the LoadBalancerIP. The healthcheck server doesn't bind the healthCheckNodePort on the LoadBalancerIP (LBip). Instead, Google Cloud Platform's Load Balancer performs the health checks using the LB IP as the destination IP rather than the node IP. To facilitate this change, 'EnableHealthCheckLoadBalancerIP' adds service specifically for the healthcheck port. The creation and removal of this additional service are coupled to the primary service that requires health checking. Fixes: #26727 Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
/test |
Create a LoadBalancer service for HC only if EnableHealthCheckLoadBalancerIP is set. More ctx about the latter - #26728. Signed-off-by: Martynas Pumputis <martynas@isovalent.com>
Create a LoadBalancer service for HC only if EnableHealthCheckLoadBalancerIP is set. More ctx about the latter - #26728. Signed-off-by: Martynas Pumputis <martynas@isovalent.com>
Create a LoadBalancer service for HC only if EnableHealthCheckLoadBalancerIP is set. More ctx about the latter - #26728. Signed-off-by: Martynas Pumputis <martynas@isovalent.com>
Create a LoadBalancer service for HC only if EnableHealthCheckLoadBalancerIP is set. More ctx about the latter - #26728. Signed-off-by: Martynas Pumputis <martynas@isovalent.com>
Create a LoadBalancer service for HC only if EnableHealthCheckLoadBalancerIP is set. More ctx about the latter - #26728. Signed-off-by: Martynas Pumputis <martynas@isovalent.com>
Create a LoadBalancer service for HC only if EnableHealthCheckLoadBalancerIP is set. More ctx about the latter - #26728. Signed-off-by: Martynas Pumputis <martynas@isovalent.com>
Create a LoadBalancer service for HC only if EnableHealthCheckLoadBalancerIP is set. More ctx about the latter - #26728. Signed-off-by: Martynas Pumputis <martynas@isovalent.com>
Create a LoadBalancer service for HC only if EnableHealthCheckLoadBalancerIP is set. More ctx about the latter - cilium#26728. Signed-off-by: Martynas Pumputis <martynas@isovalent.com>
This Pull Request introduces the 'EnableHealthCheckLoadBalancerIP' flag, which exposes the healthCheckNodePort on the LoadBalancerIP (LB IP). This addition aims to resolve an issue where clusters hosted on GCP in KubeProxyReplacement mode, using a loadbalancer-service with
externalTrafficPolicy: Local
, were triggering failures in GCP health checks. This, in turn, was causing ingress traffic to be distributed among all Kubernetes nodes, which is not compatible with the Local traffic policy.Specifically, GCP's Load Balancer performs the health checks using the LB IP as the destination IP rather than the node IP. While the cloud-provider-gcp sets up these healthchecks based on the services' spec.healthCheckNodePort which is accessible by Cilium on the nodeIP, it doesn't acknowledge the GCP LB healthcheck packets because Cilium's HealthServer binds to local IPs and doesn't have forwarding rules for the LB IPs.
Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.
Fixes: #26727