mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Remove some unused proxy args/fields
Remove the utilexec.Interface args from the iptables/ipvs constructors (which have been unused since the conntrack cleanup code was ported to netlink). Remove the EventRecorder fields from the iptables/ipvs Proxiers, which have been unused since we removed the port-opener code in 2022. Remove the strictARP field from the ipvs Proxier, which has apparently always been unused (strictARP is only looked at at construct time).
This commit is contained in:
@@ -54,7 +54,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/proxy/util/nfacct"
|
||||
"k8s.io/kubernetes/pkg/util/async"
|
||||
utiliptables "k8s.io/kubernetes/pkg/util/iptables"
|
||||
utilexec "k8s.io/utils/exec"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -101,7 +100,6 @@ func NewDualStackProxier(
|
||||
ctx context.Context,
|
||||
ipt [2]utiliptables.Interface,
|
||||
sysctl utilsysctl.Interface,
|
||||
exec utilexec.Interface,
|
||||
syncPeriod time.Duration,
|
||||
minSyncPeriod time.Duration,
|
||||
masqueradeAll bool,
|
||||
@@ -117,7 +115,7 @@ func NewDualStackProxier(
|
||||
) (proxy.Provider, error) {
|
||||
// Create an ipv4 instance of the single-stack proxier
|
||||
ipv4Proxier, err := NewProxier(ctx, v1.IPv4Protocol, ipt[0], sysctl,
|
||||
exec, syncPeriod, minSyncPeriod, masqueradeAll, localhostNodePorts, masqueradeBit,
|
||||
syncPeriod, minSyncPeriod, masqueradeAll, localhostNodePorts, masqueradeBit,
|
||||
localDetectors[v1.IPv4Protocol], hostname, nodeIPs[v1.IPv4Protocol],
|
||||
recorder, healthzServer, nodePortAddresses, initOnly)
|
||||
if err != nil {
|
||||
@@ -125,7 +123,7 @@ func NewDualStackProxier(
|
||||
}
|
||||
|
||||
ipv6Proxier, err := NewProxier(ctx, v1.IPv6Protocol, ipt[1], sysctl,
|
||||
exec, syncPeriod, minSyncPeriod, masqueradeAll, false, masqueradeBit,
|
||||
syncPeriod, minSyncPeriod, masqueradeAll, false, masqueradeBit,
|
||||
localDetectors[v1.IPv6Protocol], hostname, nodeIPs[v1.IPv6Protocol],
|
||||
recorder, healthzServer, nodePortAddresses, initOnly)
|
||||
if err != nil {
|
||||
@@ -175,7 +173,6 @@ type Proxier struct {
|
||||
localDetector proxyutil.LocalTrafficDetector
|
||||
hostname string
|
||||
nodeIP net.IP
|
||||
recorder events.EventRecorder
|
||||
|
||||
serviceHealthServer healthcheck.ServiceHealthServer
|
||||
healthzServer *healthcheck.ProxyHealthServer
|
||||
@@ -230,7 +227,6 @@ func NewProxier(ctx context.Context,
|
||||
ipFamily v1.IPFamily,
|
||||
ipt utiliptables.Interface,
|
||||
sysctl utilsysctl.Interface,
|
||||
exec utilexec.Interface,
|
||||
syncPeriod time.Duration,
|
||||
minSyncPeriod time.Duration,
|
||||
masqueradeAll bool,
|
||||
@@ -300,7 +296,6 @@ func NewProxier(ctx context.Context,
|
||||
localDetector: localDetector,
|
||||
hostname: hostname,
|
||||
nodeIP: nodeIP,
|
||||
recorder: recorder,
|
||||
serviceHealthServer: serviceHealthServer,
|
||||
healthzServer: healthzServer,
|
||||
precomputedProbabilities: make([]string, 0, 1001),
|
||||
|
||||
Reference in New Issue
Block a user