mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Merge pull request #124147 from devincd/put-qps-cmd
Place the qps and burst parameters on the command line in kubemark
This commit is contained in:
commit
7196c749f2
@ -63,6 +63,8 @@ type hollowNodeConfig struct {
|
|||||||
NodeName string
|
NodeName string
|
||||||
ServerPort int
|
ServerPort int
|
||||||
ContentType string
|
ContentType string
|
||||||
|
QPS float32
|
||||||
|
Burst int
|
||||||
NodeLabels map[string]string
|
NodeLabels map[string]string
|
||||||
RegisterWithTaints []v1.Taint
|
RegisterWithTaints []v1.Taint
|
||||||
MaxPods int
|
MaxPods int
|
||||||
@ -94,6 +96,9 @@ func (c *hollowNodeConfig) addFlags(fs *pflag.FlagSet) {
|
|||||||
fs.IntVar(&c.ServerPort, "api-server-port", 443, "Port on which API server is listening.")
|
fs.IntVar(&c.ServerPort, "api-server-port", 443, "Port on which API server is listening.")
|
||||||
fs.StringVar(&c.Morph, "morph", "", fmt.Sprintf("Specifies into which Hollow component this binary should morph. Allowed values: %v", knownMorphs.List()))
|
fs.StringVar(&c.Morph, "morph", "", fmt.Sprintf("Specifies into which Hollow component this binary should morph. Allowed values: %v", knownMorphs.List()))
|
||||||
fs.StringVar(&c.ContentType, "kube-api-content-type", "application/vnd.kubernetes.protobuf", "ContentType of requests sent to apiserver.")
|
fs.StringVar(&c.ContentType, "kube-api-content-type", "application/vnd.kubernetes.protobuf", "ContentType of requests sent to apiserver.")
|
||||||
|
fs.Float32Var(&c.QPS, "kube-api-qps", 10, "QPS indicates the maximum QPS to the apiserver.")
|
||||||
|
fs.IntVar(&c.Burst, "kube-api-burst", 20, "Burst indicates maximum burst for throttle to the apiserver.")
|
||||||
|
|
||||||
bindableNodeLabels := cliflag.ConfigurationMap(c.NodeLabels)
|
bindableNodeLabels := cliflag.ConfigurationMap(c.NodeLabels)
|
||||||
fs.Var(&bindableNodeLabels, "node-labels", "Additional node labels")
|
fs.Var(&bindableNodeLabels, "node-labels", "Additional node labels")
|
||||||
fs.Var(utilflag.RegisterWithTaintsVar{Value: &c.RegisterWithTaints}, "register-with-taints", "Register the node with the given list of taints (comma separated \"<key>=<value>:<effect>\"). No-op if register-node is false.")
|
fs.Var(utilflag.RegisterWithTaintsVar{Value: &c.RegisterWithTaints}, "register-with-taints", "Register the node with the given list of taints (comma separated \"<key>=<value>:<effect>\"). No-op if register-node is false.")
|
||||||
@ -120,8 +125,8 @@ func (c *hollowNodeConfig) createClientConfigFromFile() (*restclient.Config, err
|
|||||||
return nil, fmt.Errorf("error while creating kubeconfig: %v", err)
|
return nil, fmt.Errorf("error while creating kubeconfig: %v", err)
|
||||||
}
|
}
|
||||||
config.ContentType = c.ContentType
|
config.ContentType = c.ContentType
|
||||||
config.QPS = 10
|
config.QPS = c.QPS
|
||||||
config.Burst = 20
|
config.Burst = c.Burst
|
||||||
return config, nil
|
return config, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user