Skip to content

Commit

Permalink
Merge pull request #108232 from qmloong/qmloong/chore
Browse files Browse the repository at this point in the history
fix: remove the redundant count variable
  • Loading branch information
k8s-ci-robot committed Jun 1, 2022
2 parents ba502ee + a126919 commit 22fda4e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pkg/controller/endpointslice/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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++
}
}

Expand Down

0 comments on commit 22fda4e

Please sign in to comment.