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 max-requests-inflight parameter #4395

Merged
merged 1 commit into from
Feb 14, 2018
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
241 changes: 207 additions & 34 deletions docs/apireference/build/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions docs/apireference/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@
{
"filename": "_generated_statusdetails_v1_meta_definition.md"
},
{
"filename": "_generated_targetspec_v1alpha2_kops_definition.md"
},
{
"filename": "_generated_terraformspec_v1alpha2_kops_definition.md"
},
{
"filename": "_generated_time_v1_meta_definition.md"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/apireference/build/navData.js

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

10 changes: 10 additions & 0 deletions docs/cluster_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ spec:

Note: you could use the fileAssets feature to push an advanced audit policy file on the master nodes.

#### Max Requests Inflight

The maximum number of non-mutating requests in flight at a given time. When the server exceeds this, it rejects requests. Zero for no limit. (default 400)

```yaml
spec:
kubeAPIServer:
maxRequestsInflight: 1000
```

#### 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 @@ -39,13 +39,27 @@ func Test_KubeAPIServer_BuildFlags(t *testing.T) {
},
"--insecure-port=0 --secure-port=443",
},
{
kops.KubeAPIServerConfig{
MaxRequestsInflight: 1000,
},
"--insecure-port=0 --max-requests-inflight=1000 --secure-port=0",
},
{
kops.KubeAPIServerConfig{
InsecurePort: 8080,
SecurePort: 443,
},
"--insecure-port=8080 --secure-port=443",
},
{
kops.KubeAPIServerConfig{
InsecurePort: 8080,
SecurePort: 443,
MaxRequestsInflight: 1000,
},
"--insecure-port=8080 --max-requests-inflight=1000 --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 @@ -293,6 +293,8 @@ type KubeAPIServerConfig struct {
RequestheaderAllowedNames []string `json:"requestheaderAllowedNames,omitempty" flag:"requestheader-allowed-names"`
// FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.
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"`
}

// KubeControllerManagerConfig is the configuration for the controller
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 @@ -293,6 +293,8 @@ type KubeAPIServerConfig struct {
RequestheaderAllowedNames []string `json:"requestheaderAllowedNames,omitempty" flag:"requestheader-allowed-names"`
// FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.
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"`
}

// KubeControllerManagerConfig is the configuration for the controller
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,7 @@ func autoConvert_v1alpha1_KubeAPIServerConfig_To_kops_KubeAPIServerConfig(in *Ku
out.RequestheaderClientCAFile = in.RequestheaderClientCAFile
out.RequestheaderAllowedNames = in.RequestheaderAllowedNames
out.FeatureGates = in.FeatureGates
out.MaxRequestsInflight = in.MaxRequestsInflight
return nil
}

Expand Down Expand Up @@ -1864,6 +1865,7 @@ func autoConvert_kops_KubeAPIServerConfig_To_v1alpha1_KubeAPIServerConfig(in *ko
out.RequestheaderClientCAFile = in.RequestheaderClientCAFile
out.RequestheaderAllowedNames = in.RequestheaderAllowedNames
out.FeatureGates = in.FeatureGates
out.MaxRequestsInflight = in.MaxRequestsInflight
return nil
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ type KubeAPIServerConfig struct {
RequestheaderAllowedNames []string `json:"requestheaderAllowedNames,omitempty" flag:"requestheader-allowed-names"`
// FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.
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"`
}

// KubeControllerManagerConfig is the configuration for the controller
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -2064,6 +2064,7 @@ func autoConvert_v1alpha2_KubeAPIServerConfig_To_kops_KubeAPIServerConfig(in *Ku
out.RequestheaderClientCAFile = in.RequestheaderClientCAFile
out.RequestheaderAllowedNames = in.RequestheaderAllowedNames
out.FeatureGates = in.FeatureGates
out.MaxRequestsInflight = in.MaxRequestsInflight
return nil
}

Expand Down Expand Up @@ -2126,6 +2127,7 @@ func autoConvert_kops_KubeAPIServerConfig_To_v1alpha2_KubeAPIServerConfig(in *ko
out.RequestheaderClientCAFile = in.RequestheaderClientCAFile
out.RequestheaderAllowedNames = in.RequestheaderAllowedNames
out.FeatureGates = in.FeatureGates
out.MaxRequestsInflight = in.MaxRequestsInflight
return nil
}

Expand Down
Loading