translation

package
v1.4.18 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package translation converts NetworkPolicy object to policies.NPMNetworkPolicy object which contains necessary information to program dataplanes. The basic rule of conversion is to start from simple single rule (e.g., allow all traffic, only port, only IPBlock, etc) to composite rules (e.g., port with IPBlock or port rule with peers rule (e.g., podSelector, namespaceSelector, or both podSelector and namespaceSelector)).

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrUnsupportedNamedPort is returned when named port translation feature is used in windows.
	ErrUnsupportedNamedPort = errors.New("unsupported namedport translation features used on windows")
	// ErrUnsupportedNegativeMatch is returned when negative match translation feature is used in windows.
	ErrUnsupportedNegativeMatch = errors.New("unsupported NotExist operator translation features used on windows")
)

Functions

func TranslatePolicy

func TranslatePolicy(npObj *networkingv1.NetworkPolicy) (*policies.NPMNetworkPolicy, error)

TranslatePolicy traslates networkpolicy object to NPMNetworkPolicy object and return the NPMNetworkPolicy object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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