Separate options from client to make the responsibility more clear. #938
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove the magic number in the main function and define it as a constant.
What type of PR is this?
/kind feature
What this PR does / why we need it:
add kubeclient timeout parameter.
In our scenarios, biz logic needs to be coordinated with multi-node scheduling. When the nodes' number is large, the kube API's timeout must be controlled to prevent it from being stuck.
Which issue(s) this PR fixes:
Fixes # nope
Special notes for your reviewer:
Depends on PR #681
Base on this pr, I merged my version and splited the params according to the option feature of k8s, to separate the options-related extensions(maybe more like request/transports) from the client. I also isolated the default params in client, to prepare for the future needs of hami, and avoided the magic numbers.
Does this PR introduce a user-facing change?:
nope