masq

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPMasqAgent

type IPMasqAgent struct {
	// contains filtered or unexported fields
}

IPMasqAgent is based on https://github.com/kubernetes-incubator/ip-masq-agent but collapsed into kindnetd and made ipv6 aware in an opinionated and simplified fashion using "github.com/coreos/go-iptables"

func NewIPMasqAgent

func NewIPMasqAgent(nodeInformer coreinformers.NodeInformer, noMasqueradeCIDRs string) (*IPMasqAgent, error)

NewIPMasqAgent returns a new IPMasqAgent that avoids masquerading the intra-cluster traffic but allows to masquerade the cluster to external traffic.

func (*IPMasqAgent) CleanRules

func (ma *IPMasqAgent) CleanRules()

func (*IPMasqAgent) SyncRules

func (ma *IPMasqAgent) SyncRules(ctx context.Context) error

SyncRules syncs ip masquerade rules

func (*IPMasqAgent) SyncRulesForever

func (ma *IPMasqAgent) SyncRulesForever(ctx context.Context, interval time.Duration) error

SyncRulesForever syncs ip masquerade rules forever these rules only needs to be installed once, but we run it periodically to check that are not deleted by an external program. It fails if can't sync the rules during 3 iterations TODO: aggregate errors

Jump to

Keyboard shortcuts

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