mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 20:17:41 +00:00
kubeadm: remove constants for mirror pod timeout
StaticPodMirroringTimeout and StaticPodMirroringRetryInterval are use for just an API call to get Pods(). The already existing constants.KubernetesAPICallRetryInterval and kubeadmapi.GetActiveTimeouts().KubernetesAPICall.Duration can be used for that instead.
This commit is contained in:
parent
ded6354a8f
commit
99313bea88
@ -223,13 +223,6 @@ const (
|
||||
// TLSBootstrapRetryInterval specifies how long kubeadm should wait before retrying the TLS Bootstrap check
|
||||
TLSBootstrapRetryInterval = 1 * time.Second
|
||||
|
||||
// StaticPodMirroringTimeout specifies how much time kubeadm should wait for the static pods
|
||||
// to be mirrored on the API server.
|
||||
StaticPodMirroringTimeout = 30 * time.Second
|
||||
// StaticPodMirroringRetryInterval specifies how often to check if static pods are mirrored at the
|
||||
// API server.
|
||||
StaticPodMirroringRetryInterval = 500 * time.Millisecond
|
||||
|
||||
// EtcdAPICallTimeout specifies how much time to wait for completion of requests against the etcd API.
|
||||
EtcdAPICallTimeout = 2 * time.Minute
|
||||
// EtcdAPICallRetryInterval specifies how frequently to retry requests against the etcd API.
|
||||
|
@ -197,7 +197,7 @@ func getNodeNameFromKubeletConfig(fileName string) (string, error) {
|
||||
|
||||
func getAPIEndpoint(client clientset.Interface, nodeName string, apiEndpoint *kubeadmapi.APIEndpoint) error {
|
||||
return getAPIEndpointWithRetry(client, nodeName, apiEndpoint,
|
||||
constants.StaticPodMirroringRetryInterval, constants.StaticPodMirroringTimeout)
|
||||
constants.KubernetesAPICallRetryInterval, kubeadmapi.GetActiveTimeouts().KubernetesAPICall.Duration)
|
||||
}
|
||||
|
||||
func getAPIEndpointWithRetry(client clientset.Interface, nodeName string, apiEndpoint *kubeadmapi.APIEndpoint,
|
||||
|
@ -172,7 +172,7 @@ func NewFromCluster(client clientset.Interface, certificatesDir string) (*Client
|
||||
// getEtcdEndpoints returns the list of etcd endpoints.
|
||||
func getEtcdEndpoints(client clientset.Interface) ([]string, error) {
|
||||
return getEtcdEndpointsWithRetry(client,
|
||||
constants.StaticPodMirroringRetryInterval, constants.StaticPodMirroringTimeout)
|
||||
constants.KubernetesAPICallRetryInterval, kubeadmapi.GetActiveTimeouts().KubernetesAPICall.Duration)
|
||||
}
|
||||
|
||||
func getEtcdEndpointsWithRetry(client clientset.Interface, interval, timeout time.Duration) ([]string, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user