-
Notifications
You must be signed in to change notification settings - Fork 301
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
Add support for Port to BackendConfig HealthCheckConfig #1092
Conversation
Hi @spencerhance. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test this may not be sufficient -- you will need to change the type if it is a network endpoint (part of NEG) |
4eb8d72
to
0104144
Compare
508181f
to
dc0c4ab
Compare
@bowei updated with USE_FIXED_PORT. Tested in a sandbox but adding an e2e-test will take a few changes to the test setup. |
can you beef up the commit message describing this change and what functionality it is adding (copy paste into github pr desc as well) |
@bowei Please take another look when you get a chance |
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.
Did you check the behavior for IG and NEG-based LBs?
@bowei Ready for another review |
@spencerhance Is there an e2e test to go along with this? |
@rramkumar1 Added to the e2e test case |
cmd/e2e-test/healthcheck_test.go
Outdated
@@ -52,6 +52,7 @@ func TestHealthCheck(t *testing.T) { | |||
TimeoutSec: pint64(3), | |||
HealthyThreshold: pint64(3), | |||
UnhealthyThreshold: pint64(5), | |||
Port: pint64(100), |
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.
How would this pass? Wouldn't the health checks fail unless the application is serving something on this port?
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.
The test passes when I run it locally, I believe we don't actually check for the health check to work, only that it matches the specified config
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.
But you call e2e.WaitForIngress() below which verifies the VIP returns a 200 right?
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.
Yes. I'm totally sure why it's passing. I updated the test so that there's a second test for port that uses negs and updates the port on the service as well. That should give a much clearer signal.
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.
@rramkumar1 Updated the test again, should be more clear and is passing locally
f3d3a39
to
9f83d6a
Compare
Wire in support to override the Port of a HealthCheck via BackendConfig. This also forces the PortSpecification to be "USE_FIXED_PORT" regardless of what type the health check is (e.g. neg, ilb etc.)
@spencerhance I'll LGTM this for now, but I also think we need a test case that configures the health check on a different port from the application port. For example, the app is serving on 8080 but we point the health check to 8081. We can modify the test code to use the new zoneprinter app (gcr.io/google-samples/gcp-zoneprinter:0.2 ) which allows for customizing the HC port from args. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rramkumar1, spencerhance 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 |
@rramkumar1 Thanks! That sgtm. I submitted a cherry-pick to release-1.9 here #1108 |
Cherry-Pick #1092 [Add support for Port to BackendConfig HealthCheckConfig] to release-1.9
Wires in support to override the Port of a HealthCheck via BackendConfig.
This also forces the PortSpecification to be "USE_FIXED_PORT" regardless
of what type the health check is (e.g. neg, ilb etc.)