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
Add --context for karmadactl init #1748
Conversation
Signed-off-by: lonelyCZ <531187475@qq.com>
config.QPS = float32(5.000000) | ||
config.Burst = 10 | ||
config.ContentType = "application/json" | ||
config.AcceptContentTypes = "application/json" | ||
config.UserAgent = rest.DefaultKubernetesUserAgent() |
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 these deletions have any impact?
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.
There should no impacts. They all have default value.
karmada/vendor/k8s.io/client-go/rest/config.go
Lines 115 to 121 in 2d47c5b
// QPS indicates the maximum QPS to the master from this client. | |
// If it's zero, the created RESTClient will use DefaultQPS: 5 | |
QPS float32 | |
// Maximum burst for throttle. | |
// If it's zero, the created RESTClient will use DefaultBurst: 10. | |
Burst int |
karmada/vendor/k8s.io/client-go/rest/config.go
Lines 284 to 294 in 2d47c5b
// AcceptContentTypes specifies the types the client will accept and is optional. | |
// If not set, ContentType will be used to define the Accept header | |
AcceptContentTypes string | |
// ContentType specifies the wire format used to communicate with the server. | |
// This value will be set as the Accept header on requests made to the server, and | |
// as the default content type on any object sent to the server. If not set, | |
// "application/json" is used. | |
ContentType string | |
// GroupVersion is the API version to talk to. Must be provided when initializing | |
// a RESTClient directly. When initializing a Client, will be set with the default | |
// code version. |
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.
got it.
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.
What's the reason why we set them explicitly? @prodanlabs
Generally looks good to me. Please @prodanlabs take a look. |
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 |
Signed-off-by: lonelyCZ 531187475@qq.com
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #1744
Special notes for your reviewer:
Does this PR introduce a user-facing change?: