forked from AliyunContainerService/terway
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: l1b0k <[email protected]>
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: l1b0k <[email protected]> | ||
Date: Mon, 6 Jan 2025 20:10:48 +0800 | ||
Subject: add the k8s client qps config | ||
|
||
Signed-off-by: l1b0k <[email protected]> | ||
Signed-off-by: l1b0k <[email protected]> | ||
--- | ||
daemon/cmd/daemon_main.go | 5 ++++- | ||
1 file changed, 4 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/daemon/cmd/daemon_main.go b/daemon/cmd/daemon_main.go | ||
index 4812da39c7..682521ea6a 100644 | ||
--- a/daemon/cmd/daemon_main.go | ||
+++ b/daemon/cmd/daemon_main.go | ||
@@ -393,6 +393,9 @@ func initializeFlags() { | ||
flags.Bool(option.EnableInClusterLoadBalance, false, "Enable k8s in cluster loadbalance") | ||
option.BindEnv(option.EnableInClusterLoadBalance) | ||
|
||
+ flags.Float32(option.K8sClientQPSLimit, defaults.K8sClientQPSLimit, "Queries per second limit for the K8s client") | ||
+ flags.Int(option.K8sClientBurst, defaults.K8sClientBurst, "Burst value allowed for the K8s client") | ||
+ | ||
flags.Bool(option.K8sEnableEndpointSlice, defaults.K8sEnableEndpointSlice, "Enables k8s EndpointSlice feature in Cilium if the k8s cluster supports it") | ||
option.BindEnv(option.K8sEnableEndpointSlice) | ||
|
||
@@ -1206,7 +1209,7 @@ func initEnv(cmd *cobra.Command) { | ||
// Configure k8s as soon as possible so that k8s.IsEnabled() has the right | ||
// behavior. | ||
bootstrapStats.k8sInit.Start() | ||
- k8s.Configure(option.Config.K8sAPIServer, option.Config.K8sKubeConfigPath, defaults.K8sClientQPSLimit, defaults.K8sClientBurst) | ||
+ k8s.Configure(option.Config.K8sAPIServer, option.Config.K8sKubeConfigPath, float32(option.Config.K8sClientQPSLimit), option.Config.K8sClientBurst) | ||
bootstrapStats.k8sInit.End(true) | ||
|
||
for _, grp := range option.Config.DebugVerbose { | ||
-- | ||
2.39.5 (Apple Git-154) | ||
|