mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-01 18:58:18 +00:00
Remove exec arg from utiliptables.New
It was there so you could mock the results via a FakeExec, but these days any unit tests outside of pkg/util/iptables that want to mock iptables results use a FakeIPTables instead of a real utiliptables.Interface with a FakeExec.
This commit is contained in:
@@ -25,7 +25,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/klog/v2"
|
||||
utiliptables "k8s.io/kubernetes/pkg/util/iptables"
|
||||
utilexec "k8s.io/utils/exec"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -38,10 +37,9 @@ const (
|
||||
)
|
||||
|
||||
func (kl *Kubelet) initNetworkUtil() {
|
||||
exec := utilexec.New()
|
||||
iptClients := []utiliptables.Interface{
|
||||
utiliptables.New(exec, utiliptables.ProtocolIPv4),
|
||||
utiliptables.New(exec, utiliptables.ProtocolIPv6),
|
||||
utiliptables.New(utiliptables.ProtocolIPv4),
|
||||
utiliptables.New(utiliptables.ProtocolIPv6),
|
||||
}
|
||||
|
||||
for i := range iptClients {
|
||||
|
||||
Reference in New Issue
Block a user