Do not mark errorFetchingAddressFromLease, in case when the there's no address being fetched from the lease object

Kubernetes-commit: ac3fd5c634d2d9fd2e4011294f152e64f72d205b
This commit is contained in:
Richa Banker 2024-09-27 16:37:46 -07:00 committed by Kubernetes Publisher
parent 36e57697d1
commit 40680bab4c
1 changed files with 0 additions and 3 deletions

View File

@ -203,7 +203,6 @@ func (h *peerProxyHandler) findServiceableByServers(gvr schema.GroupVersionResou
apiservers.Range(func(key, value interface{}) bool {
apiserverKey := key.(string)
if apiserverKey == localAPIServerId {
response.errorFetchingAddressFromLease = true
response.locallyServiceable = true
// stop iteration
return false
@ -221,11 +220,9 @@ func (h *peerProxyHandler) findServiceableByServers(gvr schema.GroupVersionResou
if err != nil {
response.errorFetchingAddressFromLease = true
klog.Errorf("invalid address found for server %s", apiserverKey)
// continue with iteration
return true
}
peerServerEndpoints = append(peerServerEndpoints, hostPort)
// continue with iteration
return true
})