Merge pull request #71945 from pytimer/kubeadm-etcd-fix

kubeadm: fixed etcd sync endpoints
pull/564/head
Kubernetes Prow Robot 2018-12-13 21:41:46 -08:00 committed by GitHub
commit 1c04caa043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -190,12 +190,13 @@ func NewFromCluster(client clientset.Interface, certificatesDir string) (*Client
if err != nil {
return nil, errors.Wrap(err, "error syncing endpoints with etc")
}
klog.V(1).Infof("update etcd endpoints: %s", strings.Join(etcdClient.Endpoints, ","))
return etcdClient, nil
}
// Sync synchronizes client's endpoints with the known endpoints from the etcd membership.
func (c Client) Sync() error {
func (c *Client) Sync() error {
cli, err := clientv3.New(clientv3.Config{
Endpoints: c.Endpoints,
DialTimeout: 20 * time.Second,