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 KubeAPIServer --request-timeout flag #10038

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
17 changes: 15 additions & 2 deletions docs/cluster_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The `Cluster` resource contains the specification of the cluster itself.

The complete list of keys can be found at the [Cluster](https://pkg.go.dev/k8s.io/kops/pkg/apis/kops#ClusterSpec) reference page.
The complete list of keys can be found at the [Cluster](https://pkg.go.dev/k8s.io/kops/pkg/apis/kops#ClusterSpec) reference page.

On this page, we will expand on the more important configuration keys.

Expand Down Expand Up @@ -322,6 +322,19 @@ spec:
kubeAPIServer:
maxMutatingRequestsInflight: 450
```

### Request Timeout
dntosas marked this conversation as resolved.
Show resolved Hide resolved
{{ kops_feature_table(kops_added_default='1.19') }}

The duration a handler must keep a request open before timing it out and can be overridden by other flags for specific types of requests.
Note that you must fill empty units of time with zeros. (default 1m0s)

```yaml
spec:
kubeAPIServer:
requestTimeout: 3m0s
```

### Profiling
{{ kops_feature_table(kops_added_default='1.18') }}

Expand Down Expand Up @@ -915,7 +928,7 @@ docker:
ipMasq: true
ipTables: true
```

## sshKeyName

In some cases, it may be desirable to use an existing AWS SSH key instead of allowing kops to create a new one.
Expand Down
3 changes: 3 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,9 @@ spec:
proxyClientKeyFile:
description: The apiserver's client key used for outbound requests.
type: string
requestTimeout:
description: RequestTimeout configures the duration a handler must keep a request open before timing it out. (default 1m0s)
type: string
requestheaderAllowedNames:
description: List of client certificate common names to allow to provide usernames in headers specified by --requestheader-username-headers. If empty, any client certificate validated by the authorities in --requestheader-client-ca-file is allowed.
items:
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ type KubeAPIServerConfig struct {
// EtcdQuorumRead configures the etcd-quorum-read flag, which forces consistent reads from etcd
EtcdQuorumRead *bool `json:"etcdQuorumRead,omitempty" flag:"etcd-quorum-read"`

// RequestTimeout configures the duration a handler must keep a request open before timing it out. (default 1m0s)
RequestTimeout *metav1.Duration `json:"requestTimeout,omitempty" flag:"request-timeout"`

// MinRequestTimeout configures the minimum number of seconds a handler must keep a request open before timing it out.
// Currently only honored by the watch request handler
MinRequestTimeout *int32 `json:"minRequestTimeout,omitempty" flag:"min-request-timeout"`
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,9 @@ type KubeAPIServerConfig struct {
// EtcdQuorumRead configures the etcd-quorum-read flag, which forces consistent reads from etcd
EtcdQuorumRead *bool `json:"etcdQuorumRead,omitempty" flag:"etcd-quorum-read"`

// RequestTimeout configures the duration a handler must keep a request open before timing it out. (default 1m0s)
RequestTimeout *metav1.Duration `json:"requestTimeout,omitempty" flag:"request-timeout"`

// MinRequestTimeout configures the minimum number of seconds a handler must keep a request open before timing it out.
// Currently only honored by the watch request handler
MinRequestTimeout *int32 `json:"minRequestTimeout,omitempty" flag:"min-request-timeout"`
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.

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

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

5 changes: 5 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go

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