-
Notifications
You must be signed in to change notification settings - Fork 40k
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
make get pod log with follow option as CONNECT verb #50123
Conversation
Hi @WIZARD-CXY. 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 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. I understand the commands that are listed here. |
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.
Some minor nits, but otherwise LGTM.
@@ -106,6 +106,15 @@ func MonitorRequest(request *http.Request, verb, resource, subresource, scope, c | |||
} | |||
} | |||
} | |||
|
|||
// make get pod log with follow option api request reported as watch | |||
if verb == "GET" && resource == "pods" && subresource == "log"{ |
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.
This needs gofmt'ing please.
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.
will do sir
// make get pod log with follow option api request reported as watch | ||
if verb == "GET" && resource == "pods" && subresource == "log"{ | ||
if values := request.URL.Query()["follow"]; len(values) > 0 { | ||
if values[0] == "true" { |
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.
Please use strings.ToLower(values[0])
to ignore case.
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.
will do sir
@jimmidyson fixed, PTAL |
/ok-to-test |
/retest |
/test pull-kubernetes-unit |
encountered some flaky test, ok now |
@mml @jimmidyson PTAL |
/lgtm |
Adding do-not-merge because the release note process has not been followed. |
/assign @deads2k |
@WIZARD-CXY it's the other way around. The apiserver repo is published from the staging repo. All changes must be done in staging. |
@sttts OIC, thanks for pointing it out. |
@smarterclayton changed my pr according to your suggestion. PTAL. Tested it ok as you can see below the get pod log request is reported "CONNECT" as verb |
For now, it only converts GET to CONNECT for pod log resource. Other storage may add its own StorageMetricsOverride implementation in the future if needed. |
… reported as "CONNECT" pod log request for metrics
/retest |
/unnasign |
/unassign |
/retest Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: WIZARD-CXY, jimmidyson, smarterclayton Associated issue: 49998 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 51480, 49616, 50123, 50846, 50404) |
What this PR does / why we need it:
Don't make the get log with follow option request mix with GET pods request. Make it reported as a WATCH pod log request.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Fixes #49998