kubernetesk8s.io/kubernetes/pkg/proxy/util/iptables Index | Files

package iptables

import "k8s.io/kubernetes/pkg/proxy/util/iptables"

Index

Types

type LocalTrafficDetector

type LocalTrafficDetector interface {
	// IsImplemented returns true if the implementation does something, false otherwise
	IsImplemented() bool

	// IfLocal returns iptables arguments that will match traffic from a pod
	IfLocal() []string

	// IfNotLocal returns iptables arguments that will match traffic that is not from a pod
	IfNotLocal() []string

	// IfLocalNFT returns nftables arguments that will match traffic from a pod
	IfLocalNFT() []string

	// IfNotLocalNFT returns nftables arguments that will match traffic that is not from a pod
	IfNotLocalNFT() []string
}

LocalTrafficDetector in a interface to take action (jump) based on whether traffic originated locally at the node or not

func NewDetectLocalByBridgeInterface

func NewDetectLocalByBridgeInterface(interfaceName string) (LocalTrafficDetector, error)

NewDetectLocalByBridgeInterface implements the LocalTrafficDetector interface using a bridge interface name. This can be used when a bridge can be used to capture the notion of local traffic from pods.

func NewDetectLocalByCIDR

func NewDetectLocalByCIDR(cidr string) (LocalTrafficDetector, error)

NewDetectLocalByCIDR implements the LocalTrafficDetector interface using a CIDR. This can be used when a single CIDR range can be used to capture the notion of local traffic.

func NewDetectLocalByInterfaceNamePrefix

func NewDetectLocalByInterfaceNamePrefix(interfacePrefix string) (LocalTrafficDetector, error)

NewDetectLocalByInterfaceNamePrefix implements the LocalTrafficDetector interface using an interface name prefix. This can be used when a pod interface name prefix can be used to capture the notion of local traffic. Note that this will match on all interfaces that start with the given prefix.

func NewNoOpLocalDetector

func NewNoOpLocalDetector() LocalTrafficDetector

NewNoOpLocalDetector is a no-op implementation of LocalTrafficDetector

Source Files

traffic.go

Version
v1.29.12
Published
Dec 10, 2024
Platform
js/wasm
Imports
2 packages
Last checked
16 seconds ago

Tools for package owners.