diff --git a/policy/cilium/0037-add-the-k8s-client-qps-config.patch b/policy/cilium/0037-add-the-k8s-client-qps-config.patch new file mode 100644 index 00000000..e9862587 --- /dev/null +++ b/policy/cilium/0037-add-the-k8s-client-qps-config.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: l1b0k +Date: Mon, 6 Jan 2025 20:10:48 +0800 +Subject: add the k8s client qps config + +Signed-off-by: l1b0k +Signed-off-by: l1b0k +--- + 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) +