mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #99358 from p0lyn0mial/kcm-timeout
KCM: specifies the upper-bound timeout limit for outgoing requests
This commit is contained in:
commit
c94a2f75e6
@ -21,6 +21,7 @@ package options
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
"time"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||||
@ -434,6 +435,7 @@ func (s KubeControllerManagerOptions) Config(allControllers []string, disabledBy
|
|||||||
kubeconfig.ContentConfig.ContentType = s.Generic.ClientConnection.ContentType
|
kubeconfig.ContentConfig.ContentType = s.Generic.ClientConnection.ContentType
|
||||||
kubeconfig.QPS = s.Generic.ClientConnection.QPS
|
kubeconfig.QPS = s.Generic.ClientConnection.QPS
|
||||||
kubeconfig.Burst = int(s.Generic.ClientConnection.Burst)
|
kubeconfig.Burst = int(s.Generic.ClientConnection.Burst)
|
||||||
|
kubeconfig.Timeout = 70 * time.Second // slightly bigger than the default server timeout which is 60 seconds
|
||||||
|
|
||||||
client, err := clientset.NewForConfig(restclient.AddUserAgent(kubeconfig, KubeControllerManagerUserAgent))
|
client, err := clientset.NewForConfig(restclient.AddUserAgent(kubeconfig, KubeControllerManagerUserAgent))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user