Merge pull request #137258 from ahrtr/automated-cherry-pick-of-#137251-upstream-release-1.34

Automated cherry pick of #137251: kubeadm: do not add learner member to etcd client endpoints
This commit is contained in:
Kubernetes Prow Robot
2026-03-11 16:23:38 +05:30
committed by GitHub

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
}