mirror of https://github.com/k3s-io/k3s
[kube-proxy] Make the import name of utilproxy consistent
parent
ca032528be
commit
2ae45e9f1b
|
@ -36,7 +36,7 @@ import (
|
||||||
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
utilerrors "k8s.io/apimachinery/pkg/util/errors"
|
||||||
"k8s.io/apimachinery/pkg/util/runtime"
|
"k8s.io/apimachinery/pkg/util/runtime"
|
||||||
"k8s.io/apimachinery/pkg/util/sets"
|
"k8s.io/apimachinery/pkg/util/sets"
|
||||||
proxyutil "k8s.io/kubernetes/pkg/proxy/util"
|
utilproxy "k8s.io/kubernetes/pkg/proxy/util"
|
||||||
"k8s.io/kubernetes/pkg/util/conntrack"
|
"k8s.io/kubernetes/pkg/util/conntrack"
|
||||||
"k8s.io/kubernetes/pkg/util/iptables"
|
"k8s.io/kubernetes/pkg/util/iptables"
|
||||||
utilexec "k8s.io/utils/exec"
|
utilexec "k8s.io/utils/exec"
|
||||||
|
@ -588,7 +588,7 @@ func (proxier *Proxier) openPortal(service proxy.ServicePortName, info *ServiceI
|
||||||
}
|
}
|
||||||
|
|
||||||
func (proxier *Proxier) openOnePortal(portal portal, protocol api.Protocol, proxyIP net.IP, proxyPort int, name proxy.ServicePortName) error {
|
func (proxier *Proxier) openOnePortal(portal portal, protocol api.Protocol, proxyIP net.IP, proxyPort int, name proxy.ServicePortName) error {
|
||||||
if local, err := proxyutil.IsLocalIP(portal.ip.String()); err != nil {
|
if local, err := utilproxy.IsLocalIP(portal.ip.String()); err != nil {
|
||||||
return fmt.Errorf("can't determine if IP %s is local, assuming not: %v", portal.ip, err)
|
return fmt.Errorf("can't determine if IP %s is local, assuming not: %v", portal.ip, err)
|
||||||
} else if local {
|
} else if local {
|
||||||
err := proxier.claimNodePort(portal.ip, portal.port, protocol, name)
|
err := proxier.claimNodePort(portal.ip, portal.port, protocol, name)
|
||||||
|
@ -767,7 +767,7 @@ func (proxier *Proxier) closePortal(service proxy.ServicePortName, info *Service
|
||||||
func (proxier *Proxier) closeOnePortal(portal portal, protocol api.Protocol, proxyIP net.IP, proxyPort int, name proxy.ServicePortName) []error {
|
func (proxier *Proxier) closeOnePortal(portal portal, protocol api.Protocol, proxyIP net.IP, proxyPort int, name proxy.ServicePortName) []error {
|
||||||
el := []error{}
|
el := []error{}
|
||||||
|
|
||||||
if local, err := proxyutil.IsLocalIP(portal.ip.String()); err != nil {
|
if local, err := utilproxy.IsLocalIP(portal.ip.String()); err != nil {
|
||||||
el = append(el, fmt.Errorf("can't determine if IP %s is local, assuming not: %v", portal.ip, err))
|
el = append(el, fmt.Errorf("can't determine if IP %s is local, assuming not: %v", portal.ip, err))
|
||||||
} else if local {
|
} else if local {
|
||||||
if err := proxier.releaseNodePort(portal.ip, portal.port, protocol, name); err != nil {
|
if err := proxier.releaseNodePort(portal.ip, portal.port, protocol, name); err != nil {
|
||||||
|
@ -967,7 +967,7 @@ func iptablesCommonPortalArgs(destIP net.IP, addPhysicalInterfaceMatch bool, add
|
||||||
}
|
}
|
||||||
|
|
||||||
if destIP != nil {
|
if destIP != nil {
|
||||||
args = append(args, "-d", proxyutil.ToCIDR(destIP))
|
args = append(args, "-d", utilproxy.ToCIDR(destIP))
|
||||||
}
|
}
|
||||||
|
|
||||||
if addPhysicalInterfaceMatch {
|
if addPhysicalInterfaceMatch {
|
||||||
|
|
Loading…
Reference in New Issue