mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
code cleanup: append slice without check
This commit is contained in:
parent
82d8d08c78
commit
d7a4ed9c65
@ -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