mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-08 16:30:57 -04:00
Merge pull request #137260 from ahrtr/automated-cherry-pick-of-#137251-upstream-release-1.32
Automated cherry pick of #137251: kubeadm: do not add learner member to etcd client endpoints
This commit is contained in:
commit
1214ccfca0
1 changed files with 4 additions and 2 deletions
|
|
@ -533,8 +533,10 @@ func (c *Client) addMember(name string, peerAddrs string, isLearner bool) ([]Mem
|
|||
ret = append(ret, Member{Name: memberName, PeerURL: m.PeerURLs[0]})
|
||||
}
|
||||
|
||||
// Add the new member client address to the list of endpoints
|
||||
c.Endpoints = append(c.Endpoints, GetClientURLByIP(parsedPeerAddrs.Hostname()))
|
||||
if !isLearner {
|
||||
// Add the new member client address to the list of endpoints
|
||||
c.Endpoints = append(c.Endpoints, GetClientURLByIP(parsedPeerAddrs.Hostname()))
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue