Skip to content

Commit

Permalink
Fix EndpointSlice duplication issue in finalize logic
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Kvapil <[email protected]>
  • Loading branch information
kvaps committed Dec 6, 2024
1 parent da9e0cf commit 4a20974
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/controller/kubevirteps/kubevirteps_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,14 @@ func (c *Controller) reconcileByAddressType(service *v1.Service, tenantSlices []
var desiredPorts []discovery.EndpointPort

for _, port := range service.Spec.Ports {
pName := port.Name
pProtocol := port.Protocol
pVal := port.TargetPort.IntVal

desiredPorts = append(desiredPorts, discovery.EndpointPort{
Port: &port.TargetPort.IntVal,
Protocol: &port.Protocol,
Name: &port.Name,
Port: &pVal,
Protocol: &pProtocol,
Name: &pName,
})
}

Expand Down

0 comments on commit 4a20974

Please sign in to comment.