mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
fix(helm): Use burst limit setting for discovery
When --burst-limit/$HELM_BURST_LIMIT is set, the specified value is not currently used for the discovery client instantiated by genericclioptions. This change sets genericclioptions.discoveryBurst to the value of --burst-limit, meaning it should now be possible to fix client-side throttling issues encountered by the discovery client. This value is only configured if --burst-limit is actually set. If --burst-limit is set to the default value, then discoveryBurst should be left at its default of 300. Closes #13128 Signed-off-by: Evan Foster <efoster@adobe.com>
This commit is contained in:
parent
a2a324e511
commit
69362df367
1 changed files with 6 additions and 1 deletions
|
|
@ -112,7 +112,7 @@ func New() *EnvSettings {
|
|||
env.Debug, _ = strconv.ParseBool(os.Getenv("HELM_DEBUG"))
|
||||
|
||||
// bind to kubernetes config flags
|
||||
env.config = &genericclioptions.ConfigFlags{
|
||||
config := &genericclioptions.ConfigFlags{
|
||||
Namespace: &env.namespace,
|
||||
Context: &env.KubeContext,
|
||||
BearerToken: &env.KubeToken,
|
||||
|
|
@ -133,6 +133,11 @@ func New() *EnvSettings {
|
|||
return config
|
||||
},
|
||||
}
|
||||
if env.BurstLimit != defaultBurstLimit {
|
||||
config = config.WithDiscoveryBurst(env.BurstLimit)
|
||||
}
|
||||
env.config = config
|
||||
|
||||
return env
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue