Documentation ¶
Index ¶
- type ACNPAppliedToSpec
- type ANPAppliedToSpec
- type AntreaNetworkPolicySpecBuilder
- func (b *AntreaNetworkPolicySpecBuilder) AddEgress(protoc v1.Protocol, port *int32, portName *string, endPort *int32, ...) *AntreaNetworkPolicySpecBuilder
- func (b *AntreaNetworkPolicySpecBuilder) AddEgressLogging() *AntreaNetworkPolicySpecBuilder
- func (b *AntreaNetworkPolicySpecBuilder) AddIngress(protoc v1.Protocol, port *int32, portName *string, endPort *int32, ...) *AntreaNetworkPolicySpecBuilder
- func (b *AntreaNetworkPolicySpecBuilder) Get() *crdv1alpha1.NetworkPolicy
- func (b *AntreaNetworkPolicySpecBuilder) GetAppliedToPeer(podSelector map[string]string, ...) crdv1alpha1.NetworkPolicyPeer
- func (b *AntreaNetworkPolicySpecBuilder) GetLegacy() *legacysecv1alpha1.NetworkPolicy
- func (b *AntreaNetworkPolicySpecBuilder) SetAppliedToGroup(specs []ANPAppliedToSpec) *AntreaNetworkPolicySpecBuilder
- func (b *AntreaNetworkPolicySpecBuilder) SetName(namespace string, name string) *AntreaNetworkPolicySpecBuilder
- func (b *AntreaNetworkPolicySpecBuilder) SetPriority(p float64) *AntreaNetworkPolicySpecBuilder
- func (b *AntreaNetworkPolicySpecBuilder) SetTier(tier string) *AntreaNetworkPolicySpecBuilder
- type ClusterGroupSpecBuilder
- func (b *ClusterGroupSpecBuilder) Get() *crdv1alpha2.ClusterGroup
- func (b *ClusterGroupSpecBuilder) GetLegacy() *legacycorev1alpha2.ClusterGroup
- func (b *ClusterGroupSpecBuilder) SetChildGroups(cgs []string) *ClusterGroupSpecBuilder
- func (b *ClusterGroupSpecBuilder) SetIPBlocks(ipBlocks []crdv1alpha1.IPBlock) *ClusterGroupSpecBuilder
- func (b *ClusterGroupSpecBuilder) SetName(name string) *ClusterGroupSpecBuilder
- func (b *ClusterGroupSpecBuilder) SetNamespaceSelector(nsSelector map[string]string, ...) *ClusterGroupSpecBuilder
- func (b *ClusterGroupSpecBuilder) SetPodSelector(podSelector map[string]string, ...) *ClusterGroupSpecBuilder
- func (b *ClusterGroupSpecBuilder) SetServiceReference(svcNS, svcName string) *ClusterGroupSpecBuilder
- type ClusterNetworkPolicySpecBuilder
- func (b *ClusterNetworkPolicySpecBuilder) AddEgress(protoc v1.Protocol, port *int32, portName *string, endPort *int32, ...) *ClusterNetworkPolicySpecBuilder
- func (b *ClusterNetworkPolicySpecBuilder) AddEgressLogging() *ClusterNetworkPolicySpecBuilder
- func (b *ClusterNetworkPolicySpecBuilder) AddIngress(protoc v1.Protocol, port *int32, portName *string, endPort *int32, ...) *ClusterNetworkPolicySpecBuilder
- func (b *ClusterNetworkPolicySpecBuilder) Get() *crdv1alpha1.ClusterNetworkPolicy
- func (b *ClusterNetworkPolicySpecBuilder) GetAppliedToPeer(podSelector map[string]string, nsSelector map[string]string, ...) crdv1alpha1.NetworkPolicyPeer
- func (b *ClusterNetworkPolicySpecBuilder) GetLegacy() *legacysecv1alpha1.ClusterNetworkPolicy
- func (b *ClusterNetworkPolicySpecBuilder) SetAppliedToGroup(specs []ACNPAppliedToSpec) *ClusterNetworkPolicySpecBuilder
- func (b *ClusterNetworkPolicySpecBuilder) SetName(name string) *ClusterNetworkPolicySpecBuilder
- func (b *ClusterNetworkPolicySpecBuilder) SetPriority(p float64) *ClusterNetworkPolicySpecBuilder
- func (b *ClusterNetworkPolicySpecBuilder) SetTier(tier string) *ClusterNetworkPolicySpecBuilder
- func (b *ClusterNetworkPolicySpecBuilder) WithEgressDNS() *ClusterNetworkPolicySpecBuilder
- type NetworkPolicySpecBuilder
- func (n *NetworkPolicySpecBuilder) AddEgress(protoc v1.Protocol, port *int32, portName *string, cidr *string, ...) *NetworkPolicySpecBuilder
- func (n *NetworkPolicySpecBuilder) AddIngress(protoc v1.Protocol, port *int32, portName *string, cidr *string, ...) *NetworkPolicySpecBuilder
- func (n *NetworkPolicySpecBuilder) Get() *networkingv1.NetworkPolicy
- func (n *NetworkPolicySpecBuilder) SetName(namespace string, name string) *NetworkPolicySpecBuilder
- func (n *NetworkPolicySpecBuilder) SetPodSelector(labels map[string]string) *NetworkPolicySpecBuilder
- func (n *NetworkPolicySpecBuilder) SetTypeBoth() *NetworkPolicySpecBuilder
- func (n *NetworkPolicySpecBuilder) SetTypeEgress() *NetworkPolicySpecBuilder
- func (n *NetworkPolicySpecBuilder) SetTypeIngress() *NetworkPolicySpecBuilder
- func (n *NetworkPolicySpecBuilder) WithEgressDNS() *NetworkPolicySpecBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACNPAppliedToSpec ¶ added in v0.12.3
type ACNPAppliedToSpec struct { PodSelector map[string]string NSSelector map[string]string PodSelectorMatchExp []metav1.LabelSelectorRequirement NSSelectorMatchExp []metav1.LabelSelectorRequirement Group string }
type ANPAppliedToSpec ¶ added in v0.12.3
type ANPAppliedToSpec struct { PodSelector map[string]string PodSelectorMatchExp []metav1.LabelSelectorRequirement }
type AntreaNetworkPolicySpecBuilder ¶ added in v0.10.0
type AntreaNetworkPolicySpecBuilder struct { Spec crdv1alpha1.NetworkPolicySpec Name string Namespace string }
func (*AntreaNetworkPolicySpecBuilder) AddEgress ¶ added in v0.10.0
func (b *AntreaNetworkPolicySpecBuilder) AddEgress(protoc v1.Protocol, port *int32, portName *string, endPort *int32, cidr *string, podSelector map[string]string, nsSelector map[string]string, podSelectorMatchExp []metav1.LabelSelectorRequirement, nsSelectorMatchExp []metav1.LabelSelectorRequirement, ruleAppliedToSpecs []ANPAppliedToSpec, action crdv1alpha1.RuleAction, name string) *AntreaNetworkPolicySpecBuilder
func (*AntreaNetworkPolicySpecBuilder) AddEgressLogging ¶ added in v0.11.0
func (b *AntreaNetworkPolicySpecBuilder) AddEgressLogging() *AntreaNetworkPolicySpecBuilder
func (*AntreaNetworkPolicySpecBuilder) AddIngress ¶ added in v0.10.0
func (b *AntreaNetworkPolicySpecBuilder) AddIngress(protoc v1.Protocol, port *int32, portName *string, endPort *int32, cidr *string, podSelector map[string]string, nsSelector map[string]string, podSelectorMatchExp []metav1.LabelSelectorRequirement, nsSelectorMatchExp []metav1.LabelSelectorRequirement, ruleAppliedToSpecs []ANPAppliedToSpec, action crdv1alpha1.RuleAction, name string) *AntreaNetworkPolicySpecBuilder
func (*AntreaNetworkPolicySpecBuilder) Get ¶ added in v0.10.0
func (b *AntreaNetworkPolicySpecBuilder) Get() *crdv1alpha1.NetworkPolicy
func (*AntreaNetworkPolicySpecBuilder) GetAppliedToPeer ¶ added in v0.12.0
func (b *AntreaNetworkPolicySpecBuilder) GetAppliedToPeer(podSelector map[string]string, podSelectorMatchExp []metav1.LabelSelectorRequirement) crdv1alpha1.NetworkPolicyPeer
func (*AntreaNetworkPolicySpecBuilder) GetLegacy ¶ added in v1.0.0
func (b *AntreaNetworkPolicySpecBuilder) GetLegacy() *legacysecv1alpha1.NetworkPolicy
func (*AntreaNetworkPolicySpecBuilder) SetAppliedToGroup ¶ added in v0.10.0
func (b *AntreaNetworkPolicySpecBuilder) SetAppliedToGroup(specs []ANPAppliedToSpec) *AntreaNetworkPolicySpecBuilder
func (*AntreaNetworkPolicySpecBuilder) SetName ¶ added in v0.10.0
func (b *AntreaNetworkPolicySpecBuilder) SetName(namespace string, name string) *AntreaNetworkPolicySpecBuilder
func (*AntreaNetworkPolicySpecBuilder) SetPriority ¶ added in v0.10.0
func (b *AntreaNetworkPolicySpecBuilder) SetPriority(p float64) *AntreaNetworkPolicySpecBuilder
func (*AntreaNetworkPolicySpecBuilder) SetTier ¶ added in v0.10.0
func (b *AntreaNetworkPolicySpecBuilder) SetTier(tier string) *AntreaNetworkPolicySpecBuilder
type ClusterGroupSpecBuilder ¶ added in v0.13.0
type ClusterGroupSpecBuilder struct { Spec crdv1alpha2.GroupSpec Name string }
func (*ClusterGroupSpecBuilder) Get ¶ added in v0.13.0
func (b *ClusterGroupSpecBuilder) Get() *crdv1alpha2.ClusterGroup
func (*ClusterGroupSpecBuilder) GetLegacy ¶ added in v1.0.0
func (b *ClusterGroupSpecBuilder) GetLegacy() *legacycorev1alpha2.ClusterGroup
func (*ClusterGroupSpecBuilder) SetChildGroups ¶ added in v1.0.0
func (b *ClusterGroupSpecBuilder) SetChildGroups(cgs []string) *ClusterGroupSpecBuilder
func (*ClusterGroupSpecBuilder) SetIPBlocks ¶ added in v1.0.0
func (b *ClusterGroupSpecBuilder) SetIPBlocks(ipBlocks []crdv1alpha1.IPBlock) *ClusterGroupSpecBuilder
func (*ClusterGroupSpecBuilder) SetName ¶ added in v0.13.0
func (b *ClusterGroupSpecBuilder) SetName(name string) *ClusterGroupSpecBuilder
func (*ClusterGroupSpecBuilder) SetNamespaceSelector ¶ added in v0.13.0
func (b *ClusterGroupSpecBuilder) SetNamespaceSelector(nsSelector map[string]string, nsSelectorMatchExp []metav1.LabelSelectorRequirement) *ClusterGroupSpecBuilder
func (*ClusterGroupSpecBuilder) SetPodSelector ¶ added in v0.13.0
func (b *ClusterGroupSpecBuilder) SetPodSelector(podSelector map[string]string, podSelectorMatchExp []metav1.LabelSelectorRequirement) *ClusterGroupSpecBuilder
func (*ClusterGroupSpecBuilder) SetServiceReference ¶ added in v1.0.0
func (b *ClusterGroupSpecBuilder) SetServiceReference(svcNS, svcName string) *ClusterGroupSpecBuilder
type ClusterNetworkPolicySpecBuilder ¶
type ClusterNetworkPolicySpecBuilder struct { Spec crdv1alpha1.ClusterNetworkPolicySpec Name string }
func (*ClusterNetworkPolicySpecBuilder) AddEgress ¶
func (b *ClusterNetworkPolicySpecBuilder) AddEgress(protoc v1.Protocol, port *int32, portName *string, endPort *int32, cidr *string, podSelector map[string]string, nsSelector map[string]string, podSelectorMatchExp *[]metav1.LabelSelectorRequirement, nsSelectorMatchExp *[]metav1.LabelSelectorRequirement, ruleAppliedToSpecs []ACNPAppliedToSpec, action crdv1alpha1.RuleAction, ruleClusterGroup, name string) *ClusterNetworkPolicySpecBuilder
func (*ClusterNetworkPolicySpecBuilder) AddEgressLogging ¶ added in v0.11.0
func (b *ClusterNetworkPolicySpecBuilder) AddEgressLogging() *ClusterNetworkPolicySpecBuilder
func (*ClusterNetworkPolicySpecBuilder) AddIngress ¶
func (b *ClusterNetworkPolicySpecBuilder) AddIngress(protoc v1.Protocol, port *int32, portName *string, endPort *int32, cidr *string, podSelector map[string]string, nsSelector map[string]string, podSelectorMatchExp *[]metav1.LabelSelectorRequirement, nsSelectorMatchExp *[]metav1.LabelSelectorRequirement, ruleAppliedToSpecs []ACNPAppliedToSpec, action crdv1alpha1.RuleAction, ruleClusterGroup, name string) *ClusterNetworkPolicySpecBuilder
func (*ClusterNetworkPolicySpecBuilder) Get ¶
func (b *ClusterNetworkPolicySpecBuilder) Get() *crdv1alpha1.ClusterNetworkPolicy
func (*ClusterNetworkPolicySpecBuilder) GetAppliedToPeer ¶ added in v0.12.0
func (b *ClusterNetworkPolicySpecBuilder) GetAppliedToPeer(podSelector map[string]string, nsSelector map[string]string, podSelectorMatchExp []metav1.LabelSelectorRequirement, nsSelectorMatchExp []metav1.LabelSelectorRequirement, appliedToCG string) crdv1alpha1.NetworkPolicyPeer
func (*ClusterNetworkPolicySpecBuilder) GetLegacy ¶ added in v1.0.0
func (b *ClusterNetworkPolicySpecBuilder) GetLegacy() *legacysecv1alpha1.ClusterNetworkPolicy
func (*ClusterNetworkPolicySpecBuilder) SetAppliedToGroup ¶
func (b *ClusterNetworkPolicySpecBuilder) SetAppliedToGroup(specs []ACNPAppliedToSpec) *ClusterNetworkPolicySpecBuilder
func (*ClusterNetworkPolicySpecBuilder) SetName ¶
func (b *ClusterNetworkPolicySpecBuilder) SetName(name string) *ClusterNetworkPolicySpecBuilder
func (*ClusterNetworkPolicySpecBuilder) SetPriority ¶
func (b *ClusterNetworkPolicySpecBuilder) SetPriority(p float64) *ClusterNetworkPolicySpecBuilder
func (*ClusterNetworkPolicySpecBuilder) SetTier ¶ added in v0.9.0
func (b *ClusterNetworkPolicySpecBuilder) SetTier(tier string) *ClusterNetworkPolicySpecBuilder
func (*ClusterNetworkPolicySpecBuilder) WithEgressDNS ¶
func (b *ClusterNetworkPolicySpecBuilder) WithEgressDNS() *ClusterNetworkPolicySpecBuilder
AddEgressDNS mutates the nth policy rule to allow DNS, convenience method
type NetworkPolicySpecBuilder ¶
type NetworkPolicySpecBuilder struct { Spec networkingv1.NetworkPolicySpec Name string Namespace string }
func (*NetworkPolicySpecBuilder) AddEgress ¶
func (n *NetworkPolicySpecBuilder) AddEgress(protoc v1.Protocol, port *int32, portName *string, cidr *string, exceptCIDRs []string, podSelector map[string]string, nsSelector map[string]string, podSelectorMatchExp []metav1.LabelSelectorRequirement, nsSelectorMatchExp []metav1.LabelSelectorRequirement) *NetworkPolicySpecBuilder
func (*NetworkPolicySpecBuilder) AddIngress ¶
func (n *NetworkPolicySpecBuilder) AddIngress(protoc v1.Protocol, port *int32, portName *string, cidr *string, exceptCIDRs []string, podSelector map[string]string, nsSelector map[string]string, podSelectorMatchExp []metav1.LabelSelectorRequirement, nsSelectorMatchExp []metav1.LabelSelectorRequirement) *NetworkPolicySpecBuilder
TODO: Add tests to match expressions
func (*NetworkPolicySpecBuilder) Get ¶
func (n *NetworkPolicySpecBuilder) Get() *networkingv1.NetworkPolicy
func (*NetworkPolicySpecBuilder) SetName ¶
func (n *NetworkPolicySpecBuilder) SetName(namespace string, name string) *NetworkPolicySpecBuilder
func (*NetworkPolicySpecBuilder) SetPodSelector ¶
func (n *NetworkPolicySpecBuilder) SetPodSelector(labels map[string]string) *NetworkPolicySpecBuilder
func (*NetworkPolicySpecBuilder) SetTypeBoth ¶
func (n *NetworkPolicySpecBuilder) SetTypeBoth() *NetworkPolicySpecBuilder
func (*NetworkPolicySpecBuilder) SetTypeEgress ¶
func (n *NetworkPolicySpecBuilder) SetTypeEgress() *NetworkPolicySpecBuilder
func (*NetworkPolicySpecBuilder) SetTypeIngress ¶
func (n *NetworkPolicySpecBuilder) SetTypeIngress() *NetworkPolicySpecBuilder
func (*NetworkPolicySpecBuilder) WithEgressDNS ¶
func (n *NetworkPolicySpecBuilder) WithEgressDNS() *NetworkPolicySpecBuilder
AddEgressDNS mutates the nth policy rule to allow DNS, convenience method
Click to show internal directories.
Click to hide internal directories.