mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Remove unused numExistingEndpoints
variable
This commit is contained in:
parent
57eb5d631c
commit
70d31ea917
@ -140,12 +140,10 @@ func (r *reconciler) reconcileByAddressType(service *corev1.Service, pods []*cor
|
||||
|
||||
// Build data structures for existing state.
|
||||
existingSlicesByPortMap := map[endpointutil.PortMapKey][]*discovery.EndpointSlice{}
|
||||
numExistingEndpoints := 0
|
||||
for _, existingSlice := range existingSlices {
|
||||
if ownedBy(existingSlice, service) {
|
||||
epHash := endpointutil.NewPortMapKey(existingSlice.Ports)
|
||||
existingSlicesByPortMap[epHash] = append(existingSlicesByPortMap[epHash], existingSlice)
|
||||
numExistingEndpoints += len(existingSlice.Endpoints)
|
||||
} else {
|
||||
slicesToDelete = append(slicesToDelete, existingSlice)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user