Documentation ¶
Index ¶
- func BuildRuleTemplates(direction, action string, ports []pcn_types.ProtoPort) pcn_types.ParsedRules
- func DoesK8sPolicyAffectPod(policy *networking_v1.NetworkPolicy, pod *core_v1.Pod) bool
- func FillTemplates(sourceIP, destinationIP string, rules []k8sfirewall.ChainRule) []k8sfirewall.ChainRule
- func ParseK8sEgress(policy *networking_v1.NetworkPolicy) []pcn_types.ParsedPolicy
- func ParseK8sIngress(policy *networking_v1.NetworkPolicy) []pcn_types.ParsedPolicy
- func ParseK8sPolicyTypes(policySpec *networking_v1.NetworkPolicySpec) ([]networking_v1.NetworkPolicyIngressRule, ...)
- func ParsePcnEgress(policy *v1beta.PolycubeNetworkPolicy, serv *core_v1.Service) []pcn_types.ParsedPolicy
- func ParsePcnIngress(policy *v1beta.PolycubeNetworkPolicy, serv *core_v1.Service) []pcn_types.ParsedPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRuleTemplates ¶
func BuildRuleTemplates(direction, action string, ports []pcn_types.ProtoPort) pcn_types.ParsedRules
BuildRuleTemplates builds the templates used as base to build the rules
func DoesK8sPolicyAffectPod ¶
func DoesK8sPolicyAffectPod(policy *networking_v1.NetworkPolicy, pod *core_v1.Pod) bool
DoesK8sPolicyAffectPod checks if the provided policy affects the provided pod, returning TRUE if it does
func FillTemplates ¶
func FillTemplates(sourceIP, destinationIP string, rules []k8sfirewall.ChainRule) []k8sfirewall.ChainRule
FillTemplates will build the appropriate rules based on the provided templates
func ParseK8sEgress ¶
func ParseK8sEgress(policy *networking_v1.NetworkPolicy) []pcn_types.ParsedPolicy
ParseK8sEgress parses the Egress section of a policy
func ParseK8sIngress ¶
func ParseK8sIngress(policy *networking_v1.NetworkPolicy) []pcn_types.ParsedPolicy
ParseK8sIngress parses the Ingress section of a policy
func ParseK8sPolicyTypes ¶
func ParseK8sPolicyTypes(policySpec *networking_v1.NetworkPolicySpec) ([]networking_v1.NetworkPolicyIngressRule, []networking_v1.NetworkPolicyEgressRule, string)
ParseK8sPolicyTypes will parse the policy type of the policy and return the appropriate rules and the type of this policy
func ParsePcnEgress ¶
func ParsePcnEgress(policy *v1beta.PolycubeNetworkPolicy, serv *core_v1.Service) []pcn_types.ParsedPolicy
ParsePcnEgress parses the Egress section of a polycube policy
func ParsePcnIngress ¶
func ParsePcnIngress(policy *v1beta.PolycubeNetworkPolicy, serv *core_v1.Service) []pcn_types.ParsedPolicy
ParsePcnIngress parses the Ingress section of a polycube policy
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.