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.
Click to show internal directories.
Click to hide internal directories.