iptables

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// NoConnectionToDelete is the error string returned by conntrack when no matching connections are found
	NoConnectionToDelete = "0 flow entries have been deleted"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IptablesManager

type IptablesManager interface {
	Run(stopCh <-chan struct{}, wg *sync.WaitGroup)
}

IptablesManager interface defines the method for adding dnat rules to host that needs to send network packages to kubelets

func NewIptablesManager

func NewIptablesManager(client clientset.Interface,
	nodeInformer coreinformer.NodeInformer,
	listenAddr string,
	listenInsecureAddr string,
	syncPeriod int) IptablesManager

NewIptablesManager creates an IptablesManager with ipv4 protocol

func NewIptablesManagerWithIPFamily added in v0.7.0

func NewIptablesManagerWithIPFamily(client clientset.Interface,
	nodeInformer coreinformer.NodeInformer,
	listenAddr string,
	listenInsecureAddr string,
	syncPeriod int,
	ipFamily iptables.Protocol) IptablesManager

NewIptablesManagerWithIPFamily creates an IptablesManager; deletes old chains, if any; generates new dnat rules based on IPs of current active nodes; and appends the rules to the iptable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL