mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-08 16:30:57 -04:00
Merge pull request #108232 from qmloong/qmloong/chore
fix: remove the redundant count variable
This commit is contained in:
commit
22fda4e7ee
1 changed files with 0 additions and 2 deletions
|
|
@ -150,7 +150,6 @@ func (r *reconciler) reconcileByAddressType(service *corev1.Service, pods []*cor
|
|||
// Build data structures for desired state.
|
||||
desiredMetaByPortMap := map[endpointutil.PortMapKey]*endpointMeta{}
|
||||
desiredEndpointsByPortMap := map[endpointutil.PortMapKey]endpointsliceutil.EndpointSet{}
|
||||
numDesiredEndpoints := 0
|
||||
|
||||
for _, pod := range pods {
|
||||
includeTerminating := service.Spec.PublishNotReadyAddresses || utilfeature.DefaultFeatureGate.Enabled(features.EndpointSliceTerminatingCondition)
|
||||
|
|
@ -178,7 +177,6 @@ func (r *reconciler) reconcileByAddressType(service *corev1.Service, pods []*cor
|
|||
endpoint := podToEndpoint(pod, node, service, addressType)
|
||||
if len(endpoint.Addresses) > 0 {
|
||||
desiredEndpointsByPortMap[epHash].Insert(&endpoint)
|
||||
numDesiredEndpoints++
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue