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 2026-03-11 15:17:36 +05:30 committed by GitHub
commit 1214ccfca0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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
}