Skip to content

Commit

Permalink
fact(service_endpoints_sync.go): standardize error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
aauren committed Jan 24, 2024
1 parent d3cf4d1 commit 24505f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controllers/proxy/service_endpoints_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (nsc *NetworkServicesController) setupClusterIPServices(serviceInfoMap serv
endpointsInfoMap endpointSliceInfoMap, activeServiceEndpointMap map[string][]string) error {
ipvsSvcs, err := nsc.ln.ipvsGetServices()
if err != nil {
return errors.New("Failed get list of IPVS services due to: " + err.Error())
return fmt.Errorf("failed get list of IPVS services due to: %v", err)
}

for k, svc := range serviceInfoMap {
Expand All @@ -126,7 +126,7 @@ func (nsc *NetworkServicesController) setupClusterIPServices(serviceInfoMap serv
ipv6NodeIP := utils.FindBestIPv6NodeAddress(nsc.primaryIP, nsc.nodeIPv6Addrs)
dummyVipInterface, err := nsc.ln.getKubeDummyInterface()
if err != nil {
return errors.New("Failed creating dummy interface: " + err.Error())
return fmt.Errorf("failed creating dummy interface: %v", err)
}

for family, famClusIPs := range clusterIPs {
Expand Down

0 comments on commit 24505f0

Please sign in to comment.