import "k8s.io/kubernetes/pkg/kubelet/dockershim/network/hostport"
fake_iptables.go hostport.go hostport_manager.go
func NewFakeIPTables() *fakeIPTables
type HostPortManager interface { // Add implements port mappings. // id should be a unique identifier for a pod, e.g. podSandboxID. // podPortMapping is the associated port mapping information for the pod. // natInterfaceName is the interface that localhost uses to talk to the given pod, if known. Add(id string, podPortMapping *PodPortMapping, natInterfaceName string) error // Remove cleans up matching port mappings // Remove must be able to clean up port mappings without pod IP Remove(id string, podPortMapping *PodPortMapping) error }
HostPortManager is an interface for adding and removing hostport for a given pod sandbox.
func NewHostportManager(iptables utiliptables.Interface) HostPortManager
type PodPortMapping struct { Namespace string Name string PortMappings []*PortMapping HostNetwork bool IP net.IP }
PodPortMapping represents a pod's network state and associated container port mappings
PortMapping represents a network port in a container
Package hostport imports 18 packages (graph) and is imported by 113 packages. Updated 2020-08-31. Refresh now. Tools for package owners.