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

fix: Implement proper checking of ClusterIPs health #1103

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

deedubs
Copy link

@deedubs deedubs commented Apr 14, 2022

Noticed several tests we were attempting to write were failing with a race condition on Pod availability. This PR adds proper checking of a ClusterIPs endpoints for the status managed by the pod controller via possible readiness probes.

case corev1.ServiceTypeLoadBalancer:
ingress := service.Status.LoadBalancer.Ingress
// The load balancer is ready if it has at least one ingress point
return len(ingress) > 0
// type: ClusterIP is available when the Pods matched by the Service selector are in the Status == Ready
case corev1.ServiceTypeClusterIP:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense to handle NodePort services too?

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.

None yet

2 participants