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>
pull/13129/head
Evan Foster 2 weeks ago
parent a2a324e511
commit 69362df367

@ -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…
Cancel
Save