Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't follow non-local redirects from HTTP probes #75416
What type of PR is this?
What this PR does / why we need it:
HTTP probes currently follow redirects, and perform the health check against the endpoint redirect to. This behavior differs from the documented behavior, which states that any HTTP response with a status code between 200 and 400 should be treated as success.
As a backwards-compatibility compromise, this PR modifies the probe logic follow redirects if they go to the same hostname (e.g. a relative redirect to a different path). If the redirect points to a different hostname, then the response is simply treated as a success.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
@tallclair: GitHub didn't allow me to request PR reviews from the following users: redbaron.
Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.
In response to this:
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.
[APPROVALNOTIFIER] This PR is APPROVED
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