summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-12-08 15:11:14 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-14 23:59:21 +0000
commit840eb04e03e9292c54621c7ff75cbf95e690d86f (patch)
tree60216367054d06720a38ba96b1e1b1827e7e23a2 /libpod/runtime.go
parent316341a81dec52c5fd84c6e8c194639240c57273 (diff)
downloadpodman-840eb04e03e9292c54621c7ff75cbf95e690d86f.tar.gz
podman-840eb04e03e9292c54621c7ff75cbf95e690d86f.tar.bz2
podman-840eb04e03e9292c54621c7ff75cbf95e690d86f.zip
Add iptables integration to network code
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #109 Approved by: mheon
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go25
1 files changed, 14 insertions, 11 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 9712b6dd3..480da6677 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -12,6 +12,7 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/ulule/deepcopier"
+ "k8s.io/kubernetes/pkg/kubelet/network/hostport"
)
// A RuntimeOption is a functional option which alters the Runtime created by
@@ -20,16 +21,17 @@ type RuntimeOption func(*Runtime) error
// Runtime is the core libpod runtime
type Runtime struct {
- config *RuntimeConfig
- state State
- store storage.Store
- storageService *storageService
- imageContext *types.SystemContext
- ociRuntime *OCIRuntime
- lockDir string
- netPlugin ocicni.CNIPlugin
- valid bool
- lock sync.RWMutex
+ config *RuntimeConfig
+ state State
+ store storage.Store
+ storageService *storageService
+ imageContext *types.SystemContext
+ ociRuntime *OCIRuntime
+ lockDir string
+ netPlugin ocicni.CNIPlugin
+ hostportManager hostport.HostPortManager
+ valid bool
+ lock sync.RWMutex
}
// RuntimeConfig contains configuration options used to set up the runtime
@@ -170,7 +172,8 @@ func NewRuntime(options ...RuntimeOption) (runtime *Runtime, err error) {
}
runtime.netPlugin = netPlugin
- // TODO: iptables/firewalld integration to ensure rules are in place for forwarding
+ // Set up the hostport manager
+ runtime.hostportManager = hostport.NewHostportManager()
// Set up the state
if runtime.config.InMemoryState {