-
Notifications
You must be signed in to change notification settings - Fork 7k
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 --burst-limit option for client-side throttling limit configuration #10842
Add --burst-limit option for client-side throttling limit configuration #10842
Conversation
dbc354e
to
7ddea4e
Compare
@isutton Please create a issue this PR. Thanks very much. |
--default-burst-limit --> --burst-limit or --kube-burst-limit |
Fixed in b2ba745. |
75398fc
to
b2ba745
Compare
b2ba745
to
651e5d4
Compare
unittest? |
There are no unit tests as the value is only kept to be forwarded to the client using the appropriate API; additionally there are evidences through the change in |
651e5d4
to
c8236fb
Compare
cmd/helm/root.go
Outdated
@@ -67,6 +67,7 @@ Environment variables: | |||
| $HELM_KUBEASUSER | set the Username to impersonate for the operation. | | |||
| $HELM_KUBECONTEXT | set the name of the kubeconfig context. | | |||
| $HELM_KUBETOKEN | set the Bearer KubeToken used for authentication. | | |||
| $HELM_DEFAULT_BURST_LIMIT | set the default burst limit in the case the server contains many CRDs | |
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.
HELM_DEFAULT_BURST_LIMIT --> HELM_BURST_LIMIT is right?
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 has been fixed.
add your test case into TestEnvSettings @isutton |
pkg/cli/environment_test.go |
c8236fb
to
606c700
Compare
606c700
to
0a8e7e4
Compare
TestEnvSettings has been amended to consider HELM_BURST_LIMIT environment variable and --burst-limit option. |
@isutton I think all is ok. need a core maintainer to review this. |
1 similar comment
@isutton I think all is ok. need a core maintainer to review this. |
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 looks good. A few comments
cmd/helm/root.go
Outdated
@@ -67,6 +67,7 @@ Environment variables: | |||
| $HELM_KUBEASUSER | set the Username to impersonate for the operation. | | |||
| $HELM_KUBECONTEXT | set the name of the kubeconfig context. | | |||
| $HELM_KUBETOKEN | set the Bearer KubeToken used for authentication. | | |||
| $HELM_BURST_LIMIT | set the default burst limit in the case the server contains many CRDs | |
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.
Let's both call out the default value as well how it can be disabled (-1)
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.
Fixed in 14daf80
pkg/cli/environment.go
Outdated
|
||
"helm.sh/helm/v3/pkg/helmpath" | ||
) | ||
|
||
// defaultMaxHistory sets the maximum number of releases to 0: unlimited | ||
const defaultMaxHistory = 10 | ||
|
||
// defaultBurstLimit sets the default client-side throttling limit | ||
const defaultBurstLimit = 250 |
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.
Recommend setting the value to 100
as the default. The default in the Kubernetes rest client is 10
and 250
seems to be a dramatic change
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.
Fixed in 3760853
13597f9
to
3760853
Compare
Client-side throttling seems to be an issue in larger environments such as OpenShift clusters, where it is common to have several hundreds CRDs out-of-the-box. From this view point, it is fair that clients should be able to fine tune this accordingly should the environment they work on evolves, which is currently not possible, and quite frustrating. This change introduces the --default-burst-limit option to helm (and its counterpart HELM_DEFAULT_BURST_LIMIT environment variable) to address that issue, allowing clients to properly tune their client usage as their environment evolves. Signed-off-by: Igor Sutton <isuttonl@redhat.com>
Signed-off-by: Igor Sutton <isuttonl@redhat.com>
Signed-off-by: Igor Sutton <isuttonl@redhat.com>
Signed-off-by: Igor Sutton <isuttonl@redhat.com>
Signed-off-by: Igor Sutton <isuttonl@redhat.com>
…ions Signed-off-by: Igor Sutton <isuttonl@redhat.com>
3760853
to
5392281
Compare
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
…on (helm#10842) * feat: add configuration for client-side throttling limit Client-side throttling seems to be an issue in larger environments such as OpenShift clusters, where it is common to have several hundreds CRDs out-of-the-box. From this view point, it is fair that clients should be able to fine tune this accordingly should the environment they work on evolves, which is currently not possible, and quite frustrating. This change introduces the --default-burst-limit option to helm (and its counterpart HELM_DEFAULT_BURST_LIMIT environment variable) to address that issue, allowing clients to properly tune their client usage as their environment evolves. Signed-off-by: Igor Sutton <isuttonl@redhat.com> * chore: change DefaultBurstLimit to BurstLimit Signed-off-by: Igor Sutton <isuttonl@redhat.com> * chore: add HELM_BURST_LIMIT to golden file Signed-off-by: Igor Sutton <isuttonl@redhat.com> * chore: add burst limit tests Signed-off-by: Igor Sutton <isuttonl@redhat.com> * docs: add burst limit default value to documentation Signed-off-by: Igor Sutton <isuttonl@redhat.com> * refactor: change burst limit default value to 100 per review instructions Signed-off-by: Igor Sutton <isuttonl@redhat.com> Signed-off-by: Gong Yongjie <yong-jie.gong@microfocus.com>
…on (helm#10842) * feat: add configuration for client-side throttling limit Client-side throttling seems to be an issue in larger environments such as OpenShift clusters, where it is common to have several hundreds CRDs out-of-the-box. From this view point, it is fair that clients should be able to fine tune this accordingly should the environment they work on evolves, which is currently not possible, and quite frustrating. This change introduces the --default-burst-limit option to helm (and its counterpart HELM_DEFAULT_BURST_LIMIT environment variable) to address that issue, allowing clients to properly tune their client usage as their environment evolves. Signed-off-by: Igor Sutton <isuttonl@redhat.com> * chore: change DefaultBurstLimit to BurstLimit Signed-off-by: Igor Sutton <isuttonl@redhat.com> * chore: add HELM_BURST_LIMIT to golden file Signed-off-by: Igor Sutton <isuttonl@redhat.com> * chore: add burst limit tests Signed-off-by: Igor Sutton <isuttonl@redhat.com> * docs: add burst limit default value to documentation Signed-off-by: Igor Sutton <isuttonl@redhat.com> * refactor: change burst limit default value to 100 per review instructions Signed-off-by: Igor Sutton <isuttonl@redhat.com>
…on (helm#10842) * feat: add configuration for client-side throttling limit Client-side throttling seems to be an issue in larger environments such as OpenShift clusters, where it is common to have several hundreds CRDs out-of-the-box. From this view point, it is fair that clients should be able to fine tune this accordingly should the environment they work on evolves, which is currently not possible, and quite frustrating. This change introduces the --default-burst-limit option to helm (and its counterpart HELM_DEFAULT_BURST_LIMIT environment variable) to address that issue, allowing clients to properly tune their client usage as their environment evolves. Signed-off-by: Igor Sutton <isuttonl@redhat.com> * chore: change DefaultBurstLimit to BurstLimit Signed-off-by: Igor Sutton <isuttonl@redhat.com> * chore: add HELM_BURST_LIMIT to golden file Signed-off-by: Igor Sutton <isuttonl@redhat.com> * chore: add burst limit tests Signed-off-by: Igor Sutton <isuttonl@redhat.com> * docs: add burst limit default value to documentation Signed-off-by: Igor Sutton <isuttonl@redhat.com> * refactor: change burst limit default value to 100 per review instructions Signed-off-by: Igor Sutton <isuttonl@redhat.com>
What this PR does / why we need it:
Client-side throttling seems to be an issue in larger environments such as OpenShift clusters, where it is common to have several hundreds CRDs out-of-the-box.
From this view point, it is fair that clients should be able to fine tune this accordingly should the environment they work on evolves, which is currently not possible, and quite frustrating.
This change introduces the --burst-limit option to helm (and its counterpart HELM_BURST_LIMIT environment variable) to address that issue, allowing clients to properly tune their client usage as their environment evolves.
Special notes for your reviewer:
If applicable:
Closes #10560