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
Pod log location must validate container if provided #17886
Pod log location must validate container if provided #17886
Conversation
|
Labelling this PR as size/L |
f558dd5
to
44bf2a6
Compare
|
GCE e2e test build/test passed for commit b2f7d3a829eb1c0a7487a0dff7ec91cc1fd2e7bf. |
|
GCE e2e test build/test passed for commit 44bf2a66c40b47c06c77dae5f38d2518672997cc. |
|
GCE e2e build/test failed for commit f558dd54eec1a4f37a95d0b84d092fa598739879. |
44bf2a6
to
325c5a2
Compare
325c5a2
to
bd90254
Compare
|
GCE e2e test build/test passed for commit 325c5a2eae6bc777361ab5185f175c5460ce5462. |
|
GCE e2e test build/test passed for commit bd90254c42508ee6c388683a51d8aa81e2b47ca8. |
| @@ -240,6 +240,7 @@ func LogLocation(getter ResourceGetter, connInfo client.ConnectionInfoGetter, ct | |||
| } | |||
|
|
|||
| // Try to figure out a container | |||
| // If a container was provided, it must be valid | |||
| container := opts.Container | |||
| if container == "" { | |||
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.
Mind changing this to len(container) == 0
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.
Done.
|
Lgtm, update with feedback from @kargakis? |
|
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
|
GCE e2e build/test failed for commit bd90254c42508ee6c388683a51d8aa81e2b47ca8. |
|
Build error @k8s-bot test this |
|
GCE e2e build/test failed for commit bd90254c42508ee6c388683a51d8aa81e2b47ca8. |
bd90254
to
afd5649
Compare
|
PR changed after LGTM, removing LGTM. |
|
Updated addressing @kargakis comments, @liggitt needs lgtm again. |
|
GCE e2e test build/test passed for commit afd5649. |
|
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
|
GCE e2e build/test failed for commit afd5649. |
|
@k8s-bot e2e test this please |
|
GCE e2e test build/test passed for commit afd5649. |
|
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
|
GCE e2e test build/test passed for commit afd5649. |
|
Automatic merge from submit-queue |
Auto commit by PR queue bot
When checking the log URL for a pod container we must validate the container name if provided, otherwise the method will return an URL that is actually not valid and results in an error when called, e.g.
the server could not find the requested resource ( Pod mypod).