Merge pull request #101367 from BinacsLee/binacs-controller-endpointslice-cleanup
code cleanup: append slice without check
This commit is contained in:
commit
0c054510a8
@ -199,15 +199,9 @@ func (r *reconciler) reconcileByAddressType(service *corev1.Service, pods []*cor
|
||||
Slices: len(existingSlicesByPortMap[portMap]) + len(pmSlicesToCreate) - len(pmSlicesToDelete),
|
||||
})
|
||||
|
||||
if len(pmSlicesToCreate) > 0 {
|
||||
slicesToCreate = append(slicesToCreate, pmSlicesToCreate...)
|
||||
}
|
||||
if len(pmSlicesToUpdate) > 0 {
|
||||
slicesToUpdate = append(slicesToUpdate, pmSlicesToUpdate...)
|
||||
}
|
||||
if len(pmSlicesToDelete) > 0 {
|
||||
slicesToDelete = append(slicesToDelete, pmSlicesToDelete...)
|
||||
}
|
||||
slicesToCreate = append(slicesToCreate, pmSlicesToCreate...)
|
||||
slicesToUpdate = append(slicesToUpdate, pmSlicesToUpdate...)
|
||||
slicesToDelete = append(slicesToDelete, pmSlicesToDelete...)
|
||||
}
|
||||
|
||||
// If there are unique sets of ports that are no longer desired, mark
|
||||
|
Loading…
Reference in New Issue
Block a user