Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for max-mutating-requests-inflight parameter #5832

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/cluster_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions nodeup/pkg/model/kube_apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.