networkpolicy

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 47 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorCorrupted = fmt.Errorf("packet corrupted")
View Source
var ErrorTooShort = fmt.Errorf("packet too short")

Functions

This section is empty.

Types

type Config

type Config struct {
	FailOpen                   bool // allow traffic if the controller is not available
	AdminNetworkPolicy         bool
	BaselineAdminNetworkPolicy bool
	QueueID                    int
	NodeName                   string
	NetfilterBug1766Fix        bool
	NFTableName                string // if other projects use this controllers they need to be able to use their own table name
}

func (*Config) Defaults added in v0.6.1

func (c *Config) Defaults() error

type Controller

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

Controller manages selector-based networkpolicy endpoints.

func NewController

func NewController(client clientset.Interface,
	networkpolicyInformer networkinginformers.NetworkPolicyInformer,
	namespaceInformer coreinformers.NamespaceInformer,
	podInformer coreinformers.PodInformer,
	nodeInformer coreinformers.NodeInformer,
	npaClient npaclient.Interface,
	adminNetworkPolicyInformer policyinformers.AdminNetworkPolicyInformer,
	baselineAdminNetworkPolicyInformer policyinformers.BaselineAdminNetworkPolicyInformer,
	config Config,
) (*Controller, error)

NewController returns a new *Controller.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context) error

Run will not return until stopCh is closed. workers determines how many endpoints will be handled in parallel.

Jump to

Keyboard shortcuts

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