-
Notifications
You must be signed in to change notification settings - Fork 218
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
Set a request timeout on kubectl commands #360
Conversation
Would it make sense to have this configurable, falling back to a default if not defined? |
I don't really think it is worth the extra complexity. The only reason to set this at all is to avoid an infinite timeout. If your API is taking However of course if you disagree and think this needs to be configurable let me know and I'll take a look at updating the PR 🙂
|
+1 to have that configurable |
Signed-off-by: Scott Leggett <[email protected]>
Simple kubectl commands such as get, describe, and logs should return quickly, but kubectl does not set a timeout on requests by default. This can mean kubectl hangs forever if the kubernetes API stops responding during a request, which is quite possible in CI environments where jobs may cancelled and kubernetes clusters torn down while ct is running. This change sets a configurable timeout on such kubectl commands, with a default value of 30s. Signed-off-by: Scott Leggett <[email protected]>
Okay I added a configuration option for the kubectl timeout value. |
Signed-off-by: Scott Leggett <[email protected]>
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.
lgtm
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.
thanks!
What this PR does / why we need it:
Simple kubectl commands such as get, describe, and logs should return
quickly, but kubectl does not set a timeout on requests by default.
This change sets a 30s timeout by default on such kubectl commands to
ensure that these don't hang forever if the kubernetes API stops
responding, which is quite possible in CI environments where jobs may
cancelled and kubernetes clusters torn down while ct is running.
This timeout value is configurable via the new
kubectl-timeout
option.Which issue this PR fixes
Hopefully closes: #332
Special notes for your reviewer:
n/a