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:
Kubernetes Prow Robot authored and GitHub committed 2026-03-11 15:17:36 +05:30
commit 1214ccfca0
1 file changed
+4 -2
+4 -2
View File
@@ -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
}