mirror of https://github.com/kubernetes/kops.git
Merge pull request #5832 from captainkerk/max-mutating-requests-inflight
add support for max-mutating-requests-inflight parameter
This commit is contained in:
commit
2cfb62bd79
|
|
@ -230,6 +230,14 @@ spec:
|
|||
maxRequestsInflight: 1000
|
||||
```
|
||||
|
||||
The maximum number of mutating requests in flight at a given time. When the server exceeds this, it rejects requests. Zero for no limit. (default 200)
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
kubeAPIServer:
|
||||
maxMutatingRequestsInflight: 450
|
||||
```
|
||||
|
||||
#### runtimeConfig
|
||||
|
||||
Keys and values here are translated into `--runtime-config` values for `kube-apiserver`, separated by commas.
|
||||
|
|
|
|||
|
|
@ -45,6 +45,12 @@ func Test_KubeAPIServer_BuildFlags(t *testing.T) {
|
|||
},
|
||||
"--insecure-port=0 --max-requests-inflight=1000 --secure-port=0",
|
||||
},
|
||||
{
|
||||
kops.KubeAPIServerConfig{
|
||||
MaxMutatingRequestsInflight: 900,
|
||||
},
|
||||
"--insecure-port=0 --max-mutating-requests-inflight=900 --secure-port=0",
|
||||
},
|
||||
{
|
||||
kops.KubeAPIServerConfig{
|
||||
InsecurePort: 8080,
|
||||
|
|
@ -60,6 +66,14 @@ func Test_KubeAPIServer_BuildFlags(t *testing.T) {
|
|||
},
|
||||
"--insecure-port=8080 --max-requests-inflight=1000 --secure-port=443",
|
||||
},
|
||||
{
|
||||
kops.KubeAPIServerConfig{
|
||||
InsecurePort: 8080,
|
||||
SecurePort: 443,
|
||||
MaxMutatingRequestsInflight: 900,
|
||||
},
|
||||
"--insecure-port=8080 --max-mutating-requests-inflight=900 --secure-port=443",
|
||||
},
|
||||
{
|
||||
kops.KubeAPIServerConfig{
|
||||
InsecurePort: 8080,
|
||||
|
|
|
|||
|
|
@ -345,6 +345,8 @@ type KubeAPIServerConfig struct {
|
|||
FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"`
|
||||
// MaxRequestsInflight The maximum number of non-mutating requests in flight at a given time.
|
||||
MaxRequestsInflight int32 `json:"maxRequestsInflight,omitempty" flag:"max-requests-inflight" flag-empty:"0"`
|
||||
// MaxMutatingRequestsInflight The maximum number of mutating requests in flight at a given time. Defaults to 200
|
||||
MaxMutatingRequestsInflight int32 `json:"maxMutatingRequestsInflight,omitempty" flag:"max-mutating-requests-inflight" flag-empty:"0"`
|
||||
|
||||
// EtcdQuorumRead configures the etcd-quorum-read flag, which forces consistent reads from etcd
|
||||
EtcdQuorumRead *bool `json:"etcdQuorumRead,omitempty" flag:"etcd-quorum-read"`
|
||||
|
|
|
|||
|
|
@ -345,6 +345,8 @@ type KubeAPIServerConfig struct {
|
|||
FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"`
|
||||
// MaxRequestsInflight The maximum number of non-mutating requests in flight at a given time.
|
||||
MaxRequestsInflight int32 `json:"maxRequestsInflight,omitempty" flag:"max-requests-inflight" flag-empty:"0"`
|
||||
// MaxMutatingRequestsInflight The maximum number of mutating requests in flight at a given time. Defaults to 200
|
||||
MaxMutatingRequestsInflight int32 `json:"maxMutatingRequestsInflight,omitempty" flag:"max-mutating-requests-inflight" flag-empty:"0"`
|
||||
|
||||
// EtcdQuorumRead configures the etcd-quorum-read flag, which forces consistent reads from etcd
|
||||
EtcdQuorumRead *bool `json:"etcdQuorumRead,omitempty" flag:"etcd-quorum-read"`
|
||||
|
|
|
|||
|
|
@ -2218,6 +2218,7 @@ func autoConvert_v1alpha1_KubeAPIServerConfig_To_kops_KubeAPIServerConfig(in *Ku
|
|||
out.RequestheaderAllowedNames = in.RequestheaderAllowedNames
|
||||
out.FeatureGates = in.FeatureGates
|
||||
out.MaxRequestsInflight = in.MaxRequestsInflight
|
||||
out.MaxMutatingRequestsInflight = in.MaxMutatingRequestsInflight
|
||||
out.EtcdQuorumRead = in.EtcdQuorumRead
|
||||
out.MinRequestTimeout = in.MinRequestTimeout
|
||||
return nil
|
||||
|
|
@ -2289,6 +2290,7 @@ func autoConvert_kops_KubeAPIServerConfig_To_v1alpha1_KubeAPIServerConfig(in *ko
|
|||
out.RequestheaderAllowedNames = in.RequestheaderAllowedNames
|
||||
out.FeatureGates = in.FeatureGates
|
||||
out.MaxRequestsInflight = in.MaxRequestsInflight
|
||||
out.MaxMutatingRequestsInflight = in.MaxMutatingRequestsInflight
|
||||
out.EtcdQuorumRead = in.EtcdQuorumRead
|
||||
out.MinRequestTimeout = in.MinRequestTimeout
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -345,6 +345,8 @@ type KubeAPIServerConfig struct {
|
|||
FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"`
|
||||
// MaxRequestsInflight The maximum number of non-mutating requests in flight at a given time.
|
||||
MaxRequestsInflight int32 `json:"maxRequestsInflight,omitempty" flag:"max-requests-inflight" flag-empty:"0"`
|
||||
// MaxMutatingRequestsInflight The maximum number of mutating requests in flight at a given time. Defaults to 200
|
||||
MaxMutatingRequestsInflight int32 `json:"maxMutatingRequestsInflight,omitempty" flag:"max-mutating-requests-inflight" flag-empty:"0"`
|
||||
|
||||
// EtcdQuorumRead configures the etcd-quorum-read flag, which forces consistent reads from etcd
|
||||
EtcdQuorumRead *bool `json:"etcdQuorumRead,omitempty" flag:"etcd-quorum-read"`
|
||||
|
|
|
|||
|
|
@ -2482,6 +2482,7 @@ func autoConvert_v1alpha2_KubeAPIServerConfig_To_kops_KubeAPIServerConfig(in *Ku
|
|||
out.RequestheaderAllowedNames = in.RequestheaderAllowedNames
|
||||
out.FeatureGates = in.FeatureGates
|
||||
out.MaxRequestsInflight = in.MaxRequestsInflight
|
||||
out.MaxMutatingRequestsInflight = in.MaxMutatingRequestsInflight
|
||||
out.EtcdQuorumRead = in.EtcdQuorumRead
|
||||
out.MinRequestTimeout = in.MinRequestTimeout
|
||||
return nil
|
||||
|
|
@ -2553,6 +2554,7 @@ func autoConvert_kops_KubeAPIServerConfig_To_v1alpha2_KubeAPIServerConfig(in *ko
|
|||
out.RequestheaderAllowedNames = in.RequestheaderAllowedNames
|
||||
out.FeatureGates = in.FeatureGates
|
||||
out.MaxRequestsInflight = in.MaxRequestsInflight
|
||||
out.MaxMutatingRequestsInflight = in.MaxMutatingRequestsInflight
|
||||
out.EtcdQuorumRead = in.EtcdQuorumRead
|
||||
out.MinRequestTimeout = in.MinRequestTimeout
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue