From 0b734cec93336bf5872c5a60778e9a5a902c863a Mon Sep 17 00:00:00 2001 From: Dawn Chen Date: Mon, 23 Nov 2015 15:41:56 -0800 Subject: [PATCH] Have a sane default for RegistryPullQPS --- cmd/kubelet/app/server.go | 5 ++++- docs/admin/kubelet.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 3a6e83e2e257c..6a2bad1c9b549 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -210,6 +210,7 @@ func NewKubeletServer() *KubeletServer { RegisterNode: true, // will be ignored if no apiserver is configured RegisterSchedulable: true, RegistryBurst: 10, + RegistryPullQPS: 5.0, ResourceContainer: "/kubelet", RktPath: "", RktStage1Image: "", @@ -281,7 +282,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.HostNetworkSources, "host-network-sources", s.HostNetworkSources, "Comma-separated list of sources from which the Kubelet allows pods to use of host network. [default=\"*\"]") fs.StringVar(&s.HostPIDSources, "host-pid-sources", s.HostPIDSources, "Comma-separated list of sources from which the Kubelet allows pods to use the host pid namespace. [default=\"*\"]") fs.StringVar(&s.HostIPCSources, "host-ipc-sources", s.HostIPCSources, "Comma-separated list of sources from which the Kubelet allows pods to use the host ipc namespace. [default=\"*\"]") - fs.Float64Var(&s.RegistryPullQPS, "registry-qps", s.RegistryPullQPS, "If > 0, limit registry pull QPS to this value. If 0, unlimited. [default=0.0]") + fs.Float64Var(&s.RegistryPullQPS, "registry-qps", s.RegistryPullQPS, "If > 0, limit registry pull QPS to this value. If 0, unlimited. [default=5.0]") fs.IntVar(&s.RegistryBurst, "registry-burst", s.RegistryBurst, "Maximum size of a bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registry-qps. Only used if --registry-qps > 0") fs.Float32Var(&s.EventRecordQPS, "event-qps", s.EventRecordQPS, "If > 0, limit event creations per second to this value. If 0, unlimited. [default=0.0]") fs.IntVar(&s.EventBurst, "event-burst", s.EventBurst, "Maximum size of a bursty event records, temporarily allows event records to burst to this number, while still not exceeding event-qps. Only used if --event-qps > 0") @@ -727,6 +728,8 @@ func SimpleKubelet(client *client.Client, ReadOnlyPort: readOnlyPort, RegisterNode: true, RegisterSchedulable: true, + RegistryBurst: 10, + RegistryPullQPS: 5.0, ResolverConfig: kubelet.ResolvConfDefault, ResourceContainer: "/kubelet", RootDirectory: rootDir, diff --git a/docs/admin/kubelet.md b/docs/admin/kubelet.md index 9d746f48d6efd..a22c8ac826897 100644 --- a/docs/admin/kubelet.md +++ b/docs/admin/kubelet.md @@ -122,7 +122,7 @@ kubelet --register-node[=true]: Register the node with the apiserver (defaults to true if --api-servers is set) --register-schedulable[=true]: Register the node as schedulable. No-op if register-node is false. [default=true] --registry-burst=10: Maximum size of a bursty pulls, temporarily allows pulls to burst to this number, while still not exceeding registry-qps. Only used if --registry-qps > 0 - --registry-qps=0: If > 0, limit registry pull QPS to this value. If 0, unlimited. [default=0.0] + --registry-qps=5: If > 0, limit registry pull QPS to this value. If 0, unlimited. [default=5.0] --resolv-conf="/etc/resolv.conf": Resolver configuration file used as the basis for the container DNS resolution configuration. --resource-container="/kubelet": Absolute name of the resource-only container to create and run the Kubelet in (Default: /kubelet). --rkt-path="": Path of rkt binary. Leave empty to use the first rkt in $PATH. Only used if --container-runtime='rkt'