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

Calculate health for services #1707

Merged
merged 5 commits into from
Oct 8, 2020
Merged

Calculate health for services #1707

merged 5 commits into from
Oct 8, 2020

Conversation

nfnt
Copy link
Member

@nfnt nfnt commented Oct 7, 2020

What this PR does / why we need it:
A service is considered healthy if its cluster IP is accessible. Furthermore, if the service is load-balanced, then balancer needs to have an ingress defined.

Fixes #1699

A service is considered healthy if its cluster IP is accessible. Furthermore, if the service is load-balanced, then balancer needs to have an ingress defined.

Signed-off-by: Jan Schlicht <jan@d2iq.com>
Signed-off-by: Jan Schlicht <jan@d2iq.com>
Copy link
Contributor

@zen-dog zen-dog left a comment

Choose a reason for hiding this comment

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

A minor naming nit but otherwise LGTM 🚢

pkg/kubernetes/status/health.go Outdated Show resolved Hide resolved
Jan Schlicht and others added 2 commits October 7, 2020 16:57
Signed-off-by: Jan Schlicht <jan@d2iq.com>

Co-authored-by: Aleksey Dukhovniy <adukhovniy@mesosphere.io>
Signed-off-by: Jan Schlicht <jan@d2iq.com>
Copy link
Contributor

@alenkacz alenkacz left a comment

Choose a reason for hiding this comment

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

LGTM - should we maybe add some unit tests though? I know the health is not really covered really by tests but so far we've been using kubectl code and this is a bit more code that we actually implemented ourselves.

@nfnt
Copy link
Member Author

nfnt commented Oct 8, 2020

@alenkacz Great suggestion, I'll add unit tests for IsHealthy.

Signed-off-by: Jan Schlicht <jan@d2iq.com>
Copy link
Member

@ANeumann82 ANeumann82 left a comment

Choose a reason for hiding this comment

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

lgtm

@nfnt nfnt merged commit 853c9b3 into main Oct 8, 2020
@nfnt nfnt deleted the nfnt/service-health branch October 8, 2020 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include Service in health evaluation
4 participants