mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
globally search/replace 'KubeApiQps' to 'KubeAPIQPS' and 'KubeApiBurst' to 'KubeAPIBurst' to match GO rules
This commit is contained in:
parent
165169ab1c
commit
4302208aa9
@ -99,8 +99,8 @@ type CMServer struct {
|
|||||||
|
|
||||||
Master string
|
Master string
|
||||||
Kubeconfig string
|
Kubeconfig string
|
||||||
KubeApiQps float32
|
KubeAPIQPS float32
|
||||||
KubeApiBurst int
|
KubeAPIBurst int
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCMServer creates a new CMServer with a default config.
|
// NewCMServer creates a new CMServer with a default config.
|
||||||
@ -131,8 +131,8 @@ func NewCMServer() *CMServer {
|
|||||||
PersistentVolumeRecyclerMinimumTimeoutHostPath: 60,
|
PersistentVolumeRecyclerMinimumTimeoutHostPath: 60,
|
||||||
PersistentVolumeRecyclerIncrementTimeoutHostPath: 30,
|
PersistentVolumeRecyclerIncrementTimeoutHostPath: 30,
|
||||||
},
|
},
|
||||||
KubeApiQps: 20.0,
|
KubeAPIQPS: 20.0,
|
||||||
KubeApiBurst: 30,
|
KubeAPIBurst: 30,
|
||||||
}
|
}
|
||||||
return &s
|
return &s
|
||||||
}
|
}
|
||||||
@ -197,8 +197,8 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
|
|||||||
fs.StringVar(&s.Master, "master", s.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig)")
|
fs.StringVar(&s.Master, "master", s.Master, "The address of the Kubernetes API server (overrides any value in kubeconfig)")
|
||||||
fs.StringVar(&s.Kubeconfig, "kubeconfig", s.Kubeconfig, "Path to kubeconfig file with authorization and master location information.")
|
fs.StringVar(&s.Kubeconfig, "kubeconfig", s.Kubeconfig, "Path to kubeconfig file with authorization and master location information.")
|
||||||
fs.StringVar(&s.RootCAFile, "root-ca-file", s.RootCAFile, "If set, this root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.")
|
fs.StringVar(&s.RootCAFile, "root-ca-file", s.RootCAFile, "If set, this root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.")
|
||||||
fs.Float32Var(&s.KubeApiQps, "kube-api-qps", s.KubeApiQps, "QPS to use while talking with kubernetes apiserver")
|
fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver")
|
||||||
fs.IntVar(&s.KubeApiBurst, "kube-api-burst", s.KubeApiBurst, "Burst to use while talking with kubernetes apiserver")
|
fs.IntVar(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *CMServer) resyncPeriod() time.Duration {
|
func (s *CMServer) resyncPeriod() time.Duration {
|
||||||
@ -222,8 +222,8 @@ func (s *CMServer) Run(_ []string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Override kubeconfig qps/burst settings from flags
|
// Override kubeconfig qps/burst settings from flags
|
||||||
kubeconfig.QPS = s.KubeApiQps
|
kubeconfig.QPS = s.KubeAPIQPS
|
||||||
kubeconfig.Burst = s.KubeApiBurst
|
kubeconfig.Burst = s.KubeAPIBurst
|
||||||
|
|
||||||
kubeClient, err := client.New(kubeconfig)
|
kubeClient, err := client.New(kubeconfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -65,8 +65,8 @@ type ProxyServerConfig struct {
|
|||||||
nodeRef *api.ObjectReference // Reference to this node.
|
nodeRef *api.ObjectReference // Reference to this node.
|
||||||
MasqueradeAll bool
|
MasqueradeAll bool
|
||||||
CleanupAndExit bool
|
CleanupAndExit bool
|
||||||
KubeApiQps float32
|
KubeAPIQPS float32
|
||||||
KubeApiBurst int
|
KubeAPIBurst int
|
||||||
UDPIdleTimeout time.Duration
|
UDPIdleTimeout time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,8 +93,8 @@ func (s *ProxyServerConfig) AddFlags(fs *pflag.FlagSet) {
|
|||||||
fs.DurationVar(&s.ConfigSyncPeriod, "config-sync-period", s.ConfigSyncPeriod, "How often configuration from the apiserver is refreshed. Must be greater than 0.")
|
fs.DurationVar(&s.ConfigSyncPeriod, "config-sync-period", s.ConfigSyncPeriod, "How often configuration from the apiserver is refreshed. Must be greater than 0.")
|
||||||
fs.BoolVar(&s.MasqueradeAll, "masquerade-all", false, "If using the pure iptables proxy, SNAT everything")
|
fs.BoolVar(&s.MasqueradeAll, "masquerade-all", false, "If using the pure iptables proxy, SNAT everything")
|
||||||
fs.BoolVar(&s.CleanupAndExit, "cleanup-iptables", false, "If true cleanup iptables rules and exit.")
|
fs.BoolVar(&s.CleanupAndExit, "cleanup-iptables", false, "If true cleanup iptables rules and exit.")
|
||||||
fs.Float32Var(&s.KubeApiQps, "kube-api-qps", s.KubeApiQps, "QPS to use while talking with kubernetes apiserver")
|
fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver")
|
||||||
fs.IntVar(&s.KubeApiBurst, "kube-api-burst", s.KubeApiBurst, "Burst to use while talking with kubernetes apiserver")
|
fs.IntVar(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver")
|
||||||
fs.DurationVar(&s.UDPIdleTimeout, "udp-timeout", s.UDPIdleTimeout, "How long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxy-mode=userspace")
|
fs.DurationVar(&s.UDPIdleTimeout, "udp-timeout", s.UDPIdleTimeout, "How long an idle UDP connection will be kept open (e.g. '250ms', '2s'). Must be greater than 0. Only applicable for proxy-mode=userspace")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,8 +122,8 @@ func NewProxyConfig() *ProxyServerConfig {
|
|||||||
ResourceContainer: "/kube-proxy",
|
ResourceContainer: "/kube-proxy",
|
||||||
IptablesSyncPeriod: 30 * time.Second,
|
IptablesSyncPeriod: 30 * time.Second,
|
||||||
ConfigSyncPeriod: 15 * time.Minute,
|
ConfigSyncPeriod: 15 * time.Minute,
|
||||||
KubeApiQps: 5.0,
|
KubeAPIQPS: 5.0,
|
||||||
KubeApiBurst: 10,
|
KubeAPIBurst: 10,
|
||||||
UDPIdleTimeout: 250 * time.Millisecond,
|
UDPIdleTimeout: 250 * time.Millisecond,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -195,8 +195,8 @@ func NewProxyServerDefault(config *ProxyServerConfig) (*ProxyServer, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Override kubeconfig qps/burst settings from flags
|
// Override kubeconfig qps/burst settings from flags
|
||||||
kubeconfig.QPS = config.KubeApiQps
|
kubeconfig.QPS = config.KubeAPIQPS
|
||||||
kubeconfig.Burst = config.KubeApiBurst
|
kubeconfig.Burst = config.KubeAPIBurst
|
||||||
|
|
||||||
client, err := kubeclient.New(kubeconfig)
|
client, err := kubeclient.New(kubeconfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -144,8 +144,8 @@ type KubeletServer struct {
|
|||||||
// Crash immediately, rather than eating panics.
|
// Crash immediately, rather than eating panics.
|
||||||
ReallyCrashForTesting bool
|
ReallyCrashForTesting bool
|
||||||
|
|
||||||
KubeApiQps float32
|
KubeAPIQPS float32
|
||||||
KubeApiBurst int
|
KubeAPIBurst int
|
||||||
|
|
||||||
// Pull images one at a time.
|
// Pull images one at a time.
|
||||||
SerializeImagePulls bool
|
SerializeImagePulls bool
|
||||||
@ -188,8 +188,6 @@ func NewKubeletServer() *KubeletServer {
|
|||||||
HTTPCheckFrequency: 20 * time.Second,
|
HTTPCheckFrequency: 20 * time.Second,
|
||||||
ImageGCHighThresholdPercent: 90,
|
ImageGCHighThresholdPercent: 90,
|
||||||
ImageGCLowThresholdPercent: 80,
|
ImageGCLowThresholdPercent: 80,
|
||||||
KubeApiQps: 5.0,
|
|
||||||
KubeApiBurst: 10,
|
|
||||||
KubeConfig: util.NewStringFlag("/var/lib/kubelet/kubeconfig"),
|
KubeConfig: util.NewStringFlag("/var/lib/kubelet/kubeconfig"),
|
||||||
LowDiskSpaceThresholdMB: 256,
|
LowDiskSpaceThresholdMB: 256,
|
||||||
MasterServiceNamespace: api.NamespaceDefault,
|
MasterServiceNamespace: api.NamespaceDefault,
|
||||||
@ -204,7 +202,6 @@ func NewKubeletServer() *KubeletServer {
|
|||||||
PodInfraContainerImage: dockertools.PodInfraContainerImage,
|
PodInfraContainerImage: dockertools.PodInfraContainerImage,
|
||||||
Port: ports.KubeletPort,
|
Port: ports.KubeletPort,
|
||||||
ReadOnlyPort: ports.KubeletReadOnlyPort,
|
ReadOnlyPort: ports.KubeletReadOnlyPort,
|
||||||
ReconcileCIDR: true,
|
|
||||||
RegisterNode: true, // will be ignored if no apiserver is configured
|
RegisterNode: true, // will be ignored if no apiserver is configured
|
||||||
RegisterSchedulable: true,
|
RegisterSchedulable: true,
|
||||||
RegistryBurst: 10,
|
RegistryBurst: 10,
|
||||||
@ -214,6 +211,9 @@ func NewKubeletServer() *KubeletServer {
|
|||||||
RootDirectory: defaultRootDir,
|
RootDirectory: defaultRootDir,
|
||||||
SyncFrequency: 10 * time.Second,
|
SyncFrequency: 10 * time.Second,
|
||||||
SystemContainer: "",
|
SystemContainer: "",
|
||||||
|
ReconcileCIDR: true,
|
||||||
|
KubeAPIQPS: 5.0,
|
||||||
|
KubeAPIBurst: 10,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,8 +293,8 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
|
|||||||
fs.Uint64Var(&s.MaxOpenFiles, "max-open-files", 1000000, "Number of files that can be opened by Kubelet process. [default=1000000]")
|
fs.Uint64Var(&s.MaxOpenFiles, "max-open-files", 1000000, "Number of files that can be opened by Kubelet process. [default=1000000]")
|
||||||
fs.BoolVar(&s.ReconcileCIDR, "reconcile-cidr", s.ReconcileCIDR, "Reconcile node CIDR with the CIDR specified by the API server. No-op if register-node or configure-cbr0 is false. [default=true]")
|
fs.BoolVar(&s.ReconcileCIDR, "reconcile-cidr", s.ReconcileCIDR, "Reconcile node CIDR with the CIDR specified by the API server. No-op if register-node or configure-cbr0 is false. [default=true]")
|
||||||
fs.BoolVar(&s.RegisterSchedulable, "register-schedulable", s.RegisterSchedulable, "Register the node as schedulable. No-op if register-node is false. [default=true]")
|
fs.BoolVar(&s.RegisterSchedulable, "register-schedulable", s.RegisterSchedulable, "Register the node as schedulable. No-op if register-node is false. [default=true]")
|
||||||
fs.Float32Var(&s.KubeApiQps, "kube-api-qps", s.KubeApiQps, "QPS to use while talking with kubernetes apiserver")
|
fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver")
|
||||||
fs.IntVar(&s.KubeApiBurst, "kube-api-burst", s.KubeApiBurst, "Burst to use while talking with kubernetes apiserver")
|
fs.IntVar(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver")
|
||||||
fs.BoolVar(&s.SerializeImagePulls, "serialize-image-pulls", s.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. [default=true]")
|
fs.BoolVar(&s.SerializeImagePulls, "serialize-image-pulls", s.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. [default=true]")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -594,8 +594,8 @@ func (s *KubeletServer) CreateAPIServerClientConfig() (*client.Config, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Override kubeconfig qps/burst settings from flags
|
// Override kubeconfig qps/burst settings from flags
|
||||||
clientConfig.QPS = s.KubeApiQps
|
clientConfig.QPS = s.KubeAPIQPS
|
||||||
clientConfig.Burst = s.KubeApiBurst
|
clientConfig.Burst = s.KubeAPIBurst
|
||||||
|
|
||||||
s.addChaosToClientConfig(clientConfig)
|
s.addChaosToClientConfig(clientConfig)
|
||||||
return clientConfig, nil
|
return clientConfig, nil
|
||||||
|
@ -56,8 +56,8 @@ type SchedulerServer struct {
|
|||||||
Kubeconfig string
|
Kubeconfig string
|
||||||
BindPodsQPS float32
|
BindPodsQPS float32
|
||||||
BindPodsBurst int
|
BindPodsBurst int
|
||||||
KubeApiQps float32
|
KubeAPIQPS float32
|
||||||
KubeApiBurst int
|
KubeAPIBurst int
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewSchedulerServer creates a new SchedulerServer with default parameters
|
// NewSchedulerServer creates a new SchedulerServer with default parameters
|
||||||
@ -68,8 +68,8 @@ func NewSchedulerServer() *SchedulerServer {
|
|||||||
AlgorithmProvider: factory.DefaultProvider,
|
AlgorithmProvider: factory.DefaultProvider,
|
||||||
BindPodsQPS: 50.0,
|
BindPodsQPS: 50.0,
|
||||||
BindPodsBurst: 100,
|
BindPodsBurst: 100,
|
||||||
KubeApiQps: 50.0,
|
KubeAPIQPS: 50.0,
|
||||||
KubeApiBurst: 100,
|
KubeAPIBurst: 100,
|
||||||
}
|
}
|
||||||
return &s
|
return &s
|
||||||
}
|
}
|
||||||
@ -85,8 +85,8 @@ func (s *SchedulerServer) AddFlags(fs *pflag.FlagSet) {
|
|||||||
fs.StringVar(&s.Kubeconfig, "kubeconfig", s.Kubeconfig, "Path to kubeconfig file with authorization and master location information.")
|
fs.StringVar(&s.Kubeconfig, "kubeconfig", s.Kubeconfig, "Path to kubeconfig file with authorization and master location information.")
|
||||||
fs.Float32Var(&s.BindPodsQPS, "bind-pods-qps", s.BindPodsQPS, "Number of bindings per second scheduler is allowed to continuously make")
|
fs.Float32Var(&s.BindPodsQPS, "bind-pods-qps", s.BindPodsQPS, "Number of bindings per second scheduler is allowed to continuously make")
|
||||||
fs.IntVar(&s.BindPodsBurst, "bind-pods-burst", s.BindPodsBurst, "Number of bindings per second scheduler is allowed to make during bursts")
|
fs.IntVar(&s.BindPodsBurst, "bind-pods-burst", s.BindPodsBurst, "Number of bindings per second scheduler is allowed to make during bursts")
|
||||||
fs.Float32Var(&s.KubeApiQps, "kube-api-qps", s.KubeApiQps, "QPS to use while talking with kubernetes apiserver")
|
fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", s.KubeAPIQPS, "QPS to use while talking with kubernetes apiserver")
|
||||||
fs.IntVar(&s.KubeApiBurst, "kube-api-burst", s.KubeApiBurst, "Burst to use while talking with kubernetes apiserver")
|
fs.IntVar(&s.KubeAPIBurst, "kube-api-burst", s.KubeAPIBurst, "Burst to use while talking with kubernetes apiserver")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run runs the specified SchedulerServer. This should never exit.
|
// Run runs the specified SchedulerServer. This should never exit.
|
||||||
@ -105,8 +105,8 @@ func (s *SchedulerServer) Run(_ []string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Override kubeconfig qps/burst settings from flags
|
// Override kubeconfig qps/burst settings from flags
|
||||||
kubeconfig.QPS = s.KubeApiQps
|
kubeconfig.QPS = s.KubeAPIQPS
|
||||||
kubeconfig.Burst = s.KubeApiBurst
|
kubeconfig.Burst = s.KubeAPIBurst
|
||||||
|
|
||||||
kubeClient, err := client.New(kubeconfig)
|
kubeClient, err := client.New(kubeconfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user