From f368413d656fae388a0247bb0f3c936473f7d8aa Mon Sep 17 00:00:00 2001 From: Paco Xu Date: Wed, 8 Mar 2023 14:04:51 +0800 Subject: [PATCH] sync default qps of kubelet change --- cmd/kubelet/app/options/options.go | 4 ++-- pkg/kubelet/apis/config/fuzzer/fuzzer.go | 4 ++-- .../KubeletConfiguration/roundtrip/default/v1beta1.yaml | 4 ++-- test/e2e/dra/test-driver/app/server.go | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index fe5467d65c2..bbfa70641f0 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -489,8 +489,8 @@ func AddKubeletConfigFlags(mainfs *pflag.FlagSet, c *kubeletconfig.KubeletConfig fs.Int64Var(&c.MaxOpenFiles, "max-open-files", c.MaxOpenFiles, "Number of files that can be opened by Kubelet process.") fs.StringVar(&c.ContentType, "kube-api-content-type", c.ContentType, "Content type of requests sent to apiserver.") - fs.Int32Var(&c.KubeAPIQPS, "kube-api-qps", c.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver. The number must be >= 0. If 0 will use DefaultQPS: 5. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags") - fs.Int32Var(&c.KubeAPIBurst, "kube-api-burst", c.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver. The number must be >= 0. If 0 will use DefaultBurst: 10. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags") + fs.Int32Var(&c.KubeAPIQPS, "kube-api-qps", c.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver. The number must be >= 0. If 0 will use DefaultQPS: 50. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags") + fs.Int32Var(&c.KubeAPIBurst, "kube-api-burst", c.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver. The number must be >= 0. If 0 will use DefaultBurst: 100. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags") fs.BoolVar(&c.SerializeImagePulls, "serialize-image-pulls", c.SerializeImagePulls, "Pull images one at a time. We recommend *not* changing the default value on nodes that run docker daemon with version < 1.9 or an Aufs storage backend. Issue #10959 has more details.") fs.Var(cliflag.NewLangleSeparatedMapStringString(&c.EvictionHard), "eviction-hard", "A set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a pod eviction.") diff --git a/pkg/kubelet/apis/config/fuzzer/fuzzer.go b/pkg/kubelet/apis/config/fuzzer/fuzzer.go index 881296c3f70..4ca102f9009 100644 --- a/pkg/kubelet/apis/config/fuzzer/fuzzer.go +++ b/pkg/kubelet/apis/config/fuzzer/fuzzer.go @@ -90,8 +90,8 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} { obj.StreamingConnectionIdleTimeout = metav1.Duration{Duration: 4 * time.Hour} obj.SyncFrequency = metav1.Duration{Duration: 1 * time.Minute} obj.ContentType = "application/vnd.kubernetes.protobuf" - obj.KubeAPIQPS = 5 - obj.KubeAPIBurst = 10 + obj.KubeAPIQPS = 50 + obj.KubeAPIBurst = 100 obj.HairpinMode = v1beta1.PromiscuousBridge obj.EvictionHard = eviction.DefaultEvictionHard obj.EvictionPressureTransitionPeriod = metav1.Duration{Duration: 5 * time.Minute} diff --git a/pkg/kubelet/apis/config/scheme/testdata/KubeletConfiguration/roundtrip/default/v1beta1.yaml b/pkg/kubelet/apis/config/scheme/testdata/KubeletConfiguration/roundtrip/default/v1beta1.yaml index 401cc7b8eb4..753708fd88c 100644 --- a/pkg/kubelet/apis/config/scheme/testdata/KubeletConfiguration/roundtrip/default/v1beta1.yaml +++ b/pkg/kubelet/apis/config/scheme/testdata/KubeletConfiguration/roundtrip/default/v1beta1.yaml @@ -46,8 +46,8 @@ imageMinimumGCAge: 2m0s iptablesDropBit: 15 iptablesMasqueradeBit: 14 kind: KubeletConfiguration -kubeAPIBurst: 10 -kubeAPIQPS: 5 +kubeAPIBurst: 100 +kubeAPIQPS: 50 localStorageCapacityIsolation: true logging: flushFrequency: 5000000000 diff --git a/test/e2e/dra/test-driver/app/server.go b/test/e2e/dra/test-driver/app/server.go index eae5e425c2d..b9127a18d2b 100644 --- a/test/e2e/dra/test-driver/app/server.go +++ b/test/e2e/dra/test-driver/app/server.go @@ -70,8 +70,8 @@ func NewCommand() *cobra.Command { fs = sharedFlagSets.FlagSet("Kubernetes client") kubeconfig := fs.String("kubeconfig", "", "Absolute path to the kube.config file. Either this or KUBECONFIG need to be set if the driver is being run out of cluster.") - kubeAPIQPS := fs.Float32("kube-api-qps", 5, "QPS to use while communicating with the kubernetes apiserver.") - kubeAPIBurst := fs.Int("kube-api-burst", 10, "Burst to use while communicating with the kubernetes apiserver.") + kubeAPIQPS := fs.Float32("kube-api-qps", 50, "QPS to use while communicating with the kubernetes apiserver.") + kubeAPIBurst := fs.Int("kube-api-burst", 100, "Burst to use while communicating with the kubernetes apiserver.") workers := fs.Int("workers", 10, "Concurrency to process multiple claims") fs = sharedFlagSets.FlagSet("http server")