diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index 026c3d2e1d7..70646c21145 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -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. diff --git a/cmd/kubeadm/app/util/config/cluster.go b/cmd/kubeadm/app/util/config/cluster.go index afd58b3345d..1a6a13a9759 100644 --- a/cmd/kubeadm/app/util/config/cluster.go +++ b/cmd/kubeadm/app/util/config/cluster.go @@ -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, diff --git a/cmd/kubeadm/app/util/etcd/etcd.go b/cmd/kubeadm/app/util/etcd/etcd.go index 35bbd3b2906..2b4d8a3d157 100644 --- a/cmd/kubeadm/app/util/etcd/etcd.go +++ b/cmd/kubeadm/app/util/etcd/etcd.go @@ -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) {