mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #97716 from chengzhycn/syncEndpoint-error-return
proxy/ipvs: return non-nil error when there is no matched IPVS servic…
This commit is contained in:
commit
5150d2f839
@ -18,6 +18,7 @@ package ipvs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@ -2007,10 +2008,13 @@ func (proxier *Proxier) syncService(svcName string, vs *utilipvs.VirtualServer,
|
||||
|
||||
func (proxier *Proxier) syncEndpoint(svcPortName proxy.ServicePortName, onlyNodeLocalEndpoints bool, vs *utilipvs.VirtualServer) error {
|
||||
appliedVirtualServer, err := proxier.ipvs.GetVirtualServer(vs)
|
||||
if err != nil || appliedVirtualServer == nil {
|
||||
if err != nil {
|
||||
klog.Errorf("Failed to get IPVS service, error: %v", err)
|
||||
return err
|
||||
}
|
||||
if appliedVirtualServer == nil {
|
||||
return errors.New("IPVS virtual service does not exist")
|
||||
}
|
||||
|
||||
// curEndpoints represents IPVS destinations listed from current system.
|
||||
curEndpoints := sets.NewString()
|
||||
|
Loading…
Reference in New Issue
Block a user