mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
code cleanup: append slice without check
This commit is contained in:
parent
82d8d08c78
commit
d7a4ed9c65
@ -199,16 +199,10 @@ func (r *reconciler) reconcileByAddressType(service *corev1.Service, pods []*cor
|
|||||||
Slices: len(existingSlicesByPortMap[portMap]) + len(pmSlicesToCreate) - len(pmSlicesToDelete),
|
Slices: len(existingSlicesByPortMap[portMap]) + len(pmSlicesToCreate) - len(pmSlicesToDelete),
|
||||||
})
|
})
|
||||||
|
|
||||||
if len(pmSlicesToCreate) > 0 {
|
|
||||||
slicesToCreate = append(slicesToCreate, pmSlicesToCreate...)
|
slicesToCreate = append(slicesToCreate, pmSlicesToCreate...)
|
||||||
}
|
|
||||||
if len(pmSlicesToUpdate) > 0 {
|
|
||||||
slicesToUpdate = append(slicesToUpdate, pmSlicesToUpdate...)
|
slicesToUpdate = append(slicesToUpdate, pmSlicesToUpdate...)
|
||||||
}
|
|
||||||
if len(pmSlicesToDelete) > 0 {
|
|
||||||
slicesToDelete = append(slicesToDelete, pmSlicesToDelete...)
|
slicesToDelete = append(slicesToDelete, pmSlicesToDelete...)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// If there are unique sets of ports that are no longer desired, mark
|
// If there are unique sets of ports that are no longer desired, mark
|
||||||
// the corresponding endpoint slices for deletion.
|
// the corresponding endpoint slices for deletion.
|
||||||
|
Loading…
Reference in New Issue
Block a user