Skip to content

Commit 3bb50bb

Browse files
Evan Fostermattfarina
Evan Foster
authored andcommittedJul 10, 2024··
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> (cherry picked from commit 69362df)
1 parent f440d3b commit 3bb50bb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎pkg/cli/environment.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func New() *EnvSettings {
112112
env.Debug, _ = strconv.ParseBool(os.Getenv("HELM_DEBUG"))
113113

114114
// bind to kubernetes config flags
115-
env.config = &genericclioptions.ConfigFlags{
115+
config := &genericclioptions.ConfigFlags{
116116
Namespace: &env.namespace,
117117
Context: &env.KubeContext,
118118
BearerToken: &env.KubeToken,
@@ -133,6 +133,11 @@ func New() *EnvSettings {
133133
return config
134134
},
135135
}
136+
if env.BurstLimit != defaultBurstLimit {
137+
config = config.WithDiscoveryBurst(env.BurstLimit)
138+
}
139+
env.config = config
140+
136141
return env
137142
}
138143

0 commit comments

Comments
 (0)
Please sign in to comment.