Skip to content

Commit 2b33288

Browse files
Merge pull request #18558 from hakman/automated-cherry-pick-of-#18556-upstream-release-1.36
Automated cherry pick of #18556: feat(api): add storageInitializationTimeout to KubeAPIServerConfig
2 parents 6c1ebb9 + ddb63c4 commit 2b33288

9 files changed

Lines changed: 40 additions & 0 deletions

k8s/crds/kops.k8s.io_clusters.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,6 +2407,12 @@ spec:
24072407
storageBackend:
24082408
description: StorageBackend is the backend storage
24092409
type: string
2410+
storageInitializationTimeout:
2411+
description: |-
2412+
StorageInitializationTimeout is the maximum amount of time to wait for the storage layer to initialize before declaring kube-apiserver ready.
2413+
Increasing this value allows etcd more time to become ready on new control-plane nodes before kube-apiserver gives up and crashes.
2414+
Default is 1m0s.
2415+
type: string
24102416
tlsCertFile:
24112417
type: string
24122418
tlsCipherSuites:

pkg/apis/kops/componentconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,11 @@ type KubeAPIServerConfig struct {
515515
// RequestTimeout configures the duration a handler must keep a request open before timing it out. (default 1m0s)
516516
RequestTimeout *metav1.Duration `json:"requestTimeout,omitempty" flag:"request-timeout"`
517517

518+
// StorageInitializationTimeout is the maximum amount of time to wait for the storage layer to initialize before declaring kube-apiserver ready.
519+
// Increasing this value allows etcd more time to become ready on new control-plane nodes before kube-apiserver gives up and crashes.
520+
// Default is 1m0s.
521+
StorageInitializationTimeout *metav1.Duration `json:"storageInitializationTimeout,omitempty" flag:"storage-initialization-timeout"`
522+
518523
// MinRequestTimeout configures the minimum number of seconds a handler must keep a request open before timing it out.
519524
// Currently only honored by the watch request handler
520525
MinRequestTimeout *int32 `json:"minRequestTimeout,omitempty" flag:"min-request-timeout"`

pkg/apis/kops/v1alpha2/componentconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,11 @@ type KubeAPIServerConfig struct {
513513
// RequestTimeout configures the duration a handler must keep a request open before timing it out. (default 1m0s)
514514
RequestTimeout *metav1.Duration `json:"requestTimeout,omitempty" flag:"request-timeout"`
515515

516+
// StorageInitializationTimeout is the maximum amount of time to wait for the storage layer to initialize before declaring kube-apiserver ready.
517+
// Increasing this value allows etcd more time to become ready on new control-plane nodes before kube-apiserver gives up and crashes.
518+
// Default is 1m0s.
519+
StorageInitializationTimeout *metav1.Duration `json:"storageInitializationTimeout,omitempty" flag:"storage-initialization-timeout"`
520+
516521
// MinRequestTimeout configures the minimum number of seconds a handler must keep a request open before timing it out.
517522
// Currently only honored by the watch request handler
518523
MinRequestTimeout *int32 `json:"minRequestTimeout,omitempty" flag:"min-request-timeout"`

pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha3/componentconfig.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,11 @@ type KubeAPIServerConfig struct {
504504
// RequestTimeout configures the duration a handler must keep a request open before timing it out. (default 1m0s)
505505
RequestTimeout *metav1.Duration `json:"requestTimeout,omitempty" flag:"request-timeout"`
506506

507+
// StorageInitializationTimeout is the maximum amount of time to wait for the storage layer to initialize before declaring kube-apiserver ready.
508+
// Increasing this value allows etcd more time to become ready on new control-plane nodes before kube-apiserver gives up and crashes.
509+
// Default is 1m0s.
510+
StorageInitializationTimeout *metav1.Duration `json:"storageInitializationTimeout,omitempty" flag:"storage-initialization-timeout"`
511+
507512
// MinRequestTimeout configures the minimum number of seconds a handler must keep a request open before timing it out.
508513
// Currently only honored by the watch request handler
509514
MinRequestTimeout *int32 `json:"minRequestTimeout,omitempty" flag:"min-request-timeout"`

pkg/apis/kops/v1alpha3/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha3/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)