server: init iptables without kube
Signed-off-by: Andrew Pilloud <andrewpilloud@igneoussystems.com>
This commit is contained in:
parent
a0e15abf5e
commit
17359e34a6
1 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,10 @@ import (
|
||||||
pb "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
|
pb "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/network/hostport"
|
"k8s.io/kubernetes/pkg/kubelet/network/hostport"
|
||||||
"k8s.io/kubernetes/pkg/kubelet/server/streaming"
|
"k8s.io/kubernetes/pkg/kubelet/server/streaming"
|
||||||
|
iptablesproxy "k8s.io/kubernetes/pkg/proxy/iptables"
|
||||||
|
utildbus "k8s.io/kubernetes/pkg/util/dbus"
|
||||||
|
utilexec "k8s.io/kubernetes/pkg/util/exec"
|
||||||
|
utiliptables "k8s.io/kubernetes/pkg/util/iptables"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -577,6 +581,8 @@ func New(config *Config) (*Server, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
iptInterface := utiliptables.New(utilexec.New(), utildbus.New(), utiliptables.ProtocolIpv4)
|
||||||
|
iptInterface.EnsureChain(utiliptables.TableNAT, iptablesproxy.KubeMarkMasqChain)
|
||||||
hostportManager := hostport.NewHostportManager()
|
hostportManager := hostport.NewHostportManager()
|
||||||
s := &Server{
|
s := &Server{
|
||||||
runtime: r,
|
runtime: r,
|
||||||
|
|
Loading…
Reference in a new issue