Documentation ¶
Index ¶
- Variables
- func Resource(resource string) schema.GroupResource
- type PolycubeNetworkPolicy
- type PolycubeNetworkPolicyEgressRule
- type PolycubeNetworkPolicyEgressRuleContainer
- type PolycubeNetworkPolicyIngressRule
- type PolycubeNetworkPolicyIngressRuleContainer
- type PolycubeNetworkPolicyList
- type PolycubeNetworkPolicyNamespaceSelector
- type PolycubeNetworkPolicyPeer
- type PolycubeNetworkPolicyPeerObject
- type PolycubeNetworkPolicyPorts
- type PolycubeNetworkPolicyPriority
- type PolycubeNetworkPolicyProtocol
- type PolycubeNetworkPolicyProtocolContainer
- type PolycubeNetworkPolicyRuleAction
- type PolycubeNetworkPolicySpec
- type PolycubeNetworkPolicyTCPFlag
- type PolycubeNetworkPolicyTarget
- type PolycubeNetworkPolicyTargetObject
- type PolycubeNetworkPolicyWithIP
Constants ¶
This section is empty.
Variables ¶
var ( SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{
Group: "polycube.network",
Version: "v1beta",
}
Define your schema name and the version
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type PolycubeNetworkPolicy ¶
type PolycubeNetworkPolicy struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // ApplyTo defines who this policy is intended for ApplyTo PolycubeNetworkPolicyTarget `json:"applyTo,omitempty"` // Priority explicitly defines the priority of the policy Priority PolycubeNetworkPolicyPriority `json:"priority,omitempty"` // Spec of this policy Spec PolycubeNetworkPolicySpec `json:"spec,omitempty"` }
PolycubeNetworkPolicy is a network policy handled by polycube
func (*PolycubeNetworkPolicy) DeepCopy ¶
func (in *PolycubeNetworkPolicy) DeepCopy() *PolycubeNetworkPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicy.
func (*PolycubeNetworkPolicy) DeepCopyInto ¶
func (in *PolycubeNetworkPolicy) DeepCopyInto(out *PolycubeNetworkPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolycubeNetworkPolicy) DeepCopyObject ¶
func (in *PolycubeNetworkPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PolycubeNetworkPolicyEgressRule ¶
type PolycubeNetworkPolicyEgressRule struct { // To is the peer To PolycubeNetworkPolicyPeer `json:"to,omitempty"` // Protocols is the protocols list Protocols []PolycubeNetworkPolicyProtocolContainer `json:"protocols,omitempty"` // TCPFlags is a list of TCP flags TCPFlags []PolycubeNetworkPolicyTCPFlag `json:"tcpflags,omitempty"` // Action is the action to be taken Action PolycubeNetworkPolicyRuleAction `json:"action,omitempty"` // Description is the description of the rule Description string `json:"description,omitempty"` }
PolycubeNetworkPolicyEgressRule the rule for egress
func (*PolycubeNetworkPolicyEgressRule) DeepCopy ¶
func (in *PolycubeNetworkPolicyEgressRule) DeepCopy() *PolycubeNetworkPolicyEgressRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyEgressRule.
func (*PolycubeNetworkPolicyEgressRule) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyEgressRule) DeepCopyInto(out *PolycubeNetworkPolicyEgressRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyEgressRuleContainer ¶
type PolycubeNetworkPolicyEgressRuleContainer struct { // +optional // DropAll specifies to drop everything in egress DropAll *bool `json:"dropAll,omitempty"` // +optional // AllowAll specifies to allow anyone in egress AllowAll *bool `json:"allowAll,omitempty"` // +optional // Rules is a list of egress rules Rules []PolycubeNetworkPolicyEgressRule `json:"rules,omitempty"` }
PolycubeNetworkPolicyEgressRuleContainer is a container of egress rules
func (*PolycubeNetworkPolicyEgressRuleContainer) DeepCopy ¶
func (in *PolycubeNetworkPolicyEgressRuleContainer) DeepCopy() *PolycubeNetworkPolicyEgressRuleContainer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyEgressRuleContainer.
func (*PolycubeNetworkPolicyEgressRuleContainer) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyEgressRuleContainer) DeepCopyInto(out *PolycubeNetworkPolicyEgressRuleContainer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyIngressRule ¶
type PolycubeNetworkPolicyIngressRule struct { // From is the peer From PolycubeNetworkPolicyPeer `json:"from,omitempty"` // Protocols is the level 4 protocol list Protocols []PolycubeNetworkPolicyProtocolContainer `json:"protocols,omitempty"` // TCPFlags is a list of TCP flags //TCPFlags []PolycubeNetworkPolicyTCPFlag `json:"tcpflags,omitempty"` // Action is the action to be taken Action PolycubeNetworkPolicyRuleAction `json:"action,omitempty"` // Description is the description of the rule Description string `json:"description,omitempty"` }
PolycubeNetworkPolicyIngressRule is an ingress rule
func (*PolycubeNetworkPolicyIngressRule) DeepCopy ¶
func (in *PolycubeNetworkPolicyIngressRule) DeepCopy() *PolycubeNetworkPolicyIngressRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyIngressRule.
func (*PolycubeNetworkPolicyIngressRule) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyIngressRule) DeepCopyInto(out *PolycubeNetworkPolicyIngressRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyIngressRuleContainer ¶
type PolycubeNetworkPolicyIngressRuleContainer struct { // +optional // DropAll specifies to drop everything in ingress DropAll *bool `json:"dropAll,omitempty"` // +optional // AllowAll specifies to allow anyone in ingress AllowAll *bool `json:"allowAll,omitempty"` // +optional // PreventDirectAccess specifies to allow anyone in ingress PreventDirectAccess *bool `json:"preventDirectAccess,omitempty"` // +optional // Rules is a list of ingress rules Rules []PolycubeNetworkPolicyIngressRule `json:"rules,omitempty"` }
PolycubeNetworkPolicyIngressRuleContainer is a container of ingress rules
func (*PolycubeNetworkPolicyIngressRuleContainer) DeepCopy ¶
func (in *PolycubeNetworkPolicyIngressRuleContainer) DeepCopy() *PolycubeNetworkPolicyIngressRuleContainer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyIngressRuleContainer.
func (*PolycubeNetworkPolicyIngressRuleContainer) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyIngressRuleContainer) DeepCopyInto(out *PolycubeNetworkPolicyIngressRuleContainer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyList ¶
type PolycubeNetworkPolicyList struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ListMeta `son:"metadata,omitempty"` // Items contains the network policies Items []PolycubeNetworkPolicy `json:"items"` }
PolycubeNetworkPolicyList contains a list of Network Policies.
func (*PolycubeNetworkPolicyList) DeepCopy ¶
func (in *PolycubeNetworkPolicyList) DeepCopy() *PolycubeNetworkPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyList.
func (*PolycubeNetworkPolicyList) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyList) DeepCopyInto(out *PolycubeNetworkPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PolycubeNetworkPolicyList) DeepCopyObject ¶
func (in *PolycubeNetworkPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PolycubeNetworkPolicyNamespaceSelector ¶
type PolycubeNetworkPolicyNamespaceSelector struct { // +optional // WithNames is a list of the names of the namespace WithNames []string `json:"withNames,omitempty"` // +optional // WithLabels is the namespace's labels WithLabels map[string]string `json:"withLabels,omitempty"` // +optional // Any specifies any namespace Any *bool `json:"any,omitempty"` }
PolycubeNetworkPolicyNamespaceSelector is a selector for namespaces
func (*PolycubeNetworkPolicyNamespaceSelector) DeepCopy ¶
func (in *PolycubeNetworkPolicyNamespaceSelector) DeepCopy() *PolycubeNetworkPolicyNamespaceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyNamespaceSelector.
func (*PolycubeNetworkPolicyNamespaceSelector) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyNamespaceSelector) DeepCopyInto(out *PolycubeNetworkPolicyNamespaceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyPeer ¶
type PolycubeNetworkPolicyPeer struct { // Peer is the peer type Peer PolycubeNetworkPolicyPeerObject `json:"peer,omitempty"` // +optional // Any tells if name and labels don't matter Any *bool `json:"any,omitempty"` // +optional // WithName specifies the name of the object. Only for Service WithName string `json:"withName,omitempty"` // +optional // WithLabels specifies the labels of the object. Only for Pod WithLabels map[string]string `json:"withLabels,omitempty"` // +optional // WithIP specifies the ip. Only for World WithIP PolycubeNetworkPolicyWithIP `json:"withIP,omitempty"` // +optional // OnNamespace specifies the namespaces of the peer. Only for Pod OnNamespace *PolycubeNetworkPolicyNamespaceSelector `json:"onNamespace,omitempty"` }
PolycubeNetworkPolicyPeer contains data of the peer
func (*PolycubeNetworkPolicyPeer) DeepCopy ¶
func (in *PolycubeNetworkPolicyPeer) DeepCopy() *PolycubeNetworkPolicyPeer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyPeer.
func (*PolycubeNetworkPolicyPeer) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyPeer) DeepCopyInto(out *PolycubeNetworkPolicyPeer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyPeerObject ¶
type PolycubeNetworkPolicyPeerObject string
PolycubeNetworkPolicyPeerObject is the object peer
const ( // PodPeer is the Pod PodPeer PolycubeNetworkPolicyPeerObject = "pod" // WorldPeer is the World WorldPeer PolycubeNetworkPolicyPeerObject = "world" )
type PolycubeNetworkPolicyPorts ¶
type PolycubeNetworkPolicyPorts struct { // +optional // Source is the source port Source int32 `json:"source,omitempty"` // Destination is the destination port Destination int32 `json:"destination,omitempty"` }
PolycubeNetworkPolicyPorts contains the ports
func (*PolycubeNetworkPolicyPorts) DeepCopy ¶
func (in *PolycubeNetworkPolicyPorts) DeepCopy() *PolycubeNetworkPolicyPorts
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyPorts.
func (*PolycubeNetworkPolicyPorts) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyPorts) DeepCopyInto(out *PolycubeNetworkPolicyPorts)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyPriority ¶
type PolycubeNetworkPolicyPriority int
PolycubeNetworkPolicyPriority is the explicit priority of the policy
type PolycubeNetworkPolicyProtocol ¶
type PolycubeNetworkPolicyProtocol string
PolycubeNetworkPolicyProtocol is the level 4 protocol
const ( // TCP is TCP TCP PolycubeNetworkPolicyProtocol = "tcp" // UDP is UDP UDP PolycubeNetworkPolicyProtocol = "udp" // ICMP is ICMPv4 ICMP PolycubeNetworkPolicyProtocol = "icmp" )
type PolycubeNetworkPolicyProtocolContainer ¶
type PolycubeNetworkPolicyProtocolContainer struct { // Ports is the container of the ports Ports PolycubeNetworkPolicyPorts `json:"ports,omitempty"` // Protocol is the l4 protocol Protocol PolycubeNetworkPolicyProtocol `json:"protocol,omitempty"` }
PolycubeNetworkPolicyProtocolContainer contains the protocol details
func (*PolycubeNetworkPolicyProtocolContainer) DeepCopy ¶
func (in *PolycubeNetworkPolicyProtocolContainer) DeepCopy() *PolycubeNetworkPolicyProtocolContainer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyProtocolContainer.
func (*PolycubeNetworkPolicyProtocolContainer) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyProtocolContainer) DeepCopyInto(out *PolycubeNetworkPolicyProtocolContainer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyRuleAction ¶
type PolycubeNetworkPolicyRuleAction string
PolycubeNetworkPolicyRuleAction is the action
const ( // DropAction is DROP DropAction PolycubeNetworkPolicyRuleAction = "drop" // BlockAction is DROP BlockAction PolycubeNetworkPolicyRuleAction = "block" // ForbidAction is DROP ForbidAction PolycubeNetworkPolicyRuleAction = "forbid" // ProhibitAction is DROP ProhibitAction PolycubeNetworkPolicyRuleAction = "prohibit" // ForwardAction is Forward ForwardAction PolycubeNetworkPolicyRuleAction = "forward" // AllowAction is Forward AllowAction PolycubeNetworkPolicyRuleAction = "allow" // PassAction is Forward PassAction PolycubeNetworkPolicyRuleAction = "pass" // PermitAction is Forward PermitAction PolycubeNetworkPolicyRuleAction = "permit" )
type PolycubeNetworkPolicySpec ¶
type PolycubeNetworkPolicySpec struct { // +optional // Description is the description of the policy Description string `json:"description,omitempty"` // +optional // IngressRules contains the ingress rules IngressRules PolycubeNetworkPolicyIngressRuleContainer `json:"ingressRules,omitempty"` // +optional // EgressRules contains the egress rules EgressRules PolycubeNetworkPolicyEgressRuleContainer `json:"egressRules,omitempty"` }
PolycubeNetworkPolicySpec contains the specifications of this Network Policy
func (*PolycubeNetworkPolicySpec) DeepCopy ¶
func (in *PolycubeNetworkPolicySpec) DeepCopy() *PolycubeNetworkPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicySpec.
func (*PolycubeNetworkPolicySpec) DeepCopyInto ¶
func (in *PolycubeNetworkPolicySpec) DeepCopyInto(out *PolycubeNetworkPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyTCPFlag ¶
type PolycubeNetworkPolicyTCPFlag string
PolycubeNetworkPolicyTCPFlag is the TCP flag
const ( // SYNFlag is SYN SYNFlag PolycubeNetworkPolicyTCPFlag = "SYN" // FINFlag is FIN FINFlag PolycubeNetworkPolicyTCPFlag = "FIN" // ACKFlag is ACK ACKFlag PolycubeNetworkPolicyTCPFlag = "ACK" // RSTFlag is RST RSTFlag PolycubeNetworkPolicyTCPFlag = "RST" // PSHFlag is PSH PSHFlag PolycubeNetworkPolicyTCPFlag = "PSH" // URGFlag is URG URGFlag PolycubeNetworkPolicyTCPFlag = "URG" // CWRFlag is CWR CWRFlag PolycubeNetworkPolicyTCPFlag = "CWR" // ECEFlag is ECE ECEFlag PolycubeNetworkPolicyTCPFlag = "ECE" )
type PolycubeNetworkPolicyTarget ¶
type PolycubeNetworkPolicyTarget struct { // Target is the object that should enforce this policy Target PolycubeNetworkPolicyTargetObject `json:"target,omitempty"` // +optional // If name and labels are irrelevant Any *bool `json:"any,omitempty"` // +optional // WithName specifies the name of the object. Valid only for Service WithName string `json:"withName,omitempty"` // +optional // WithLabels specifies the labels of the target. Valid only for Pod WithLabels map[string]string `json:"withLabels,omitempty"` }
PolycubeNetworkPolicyTarget is the target of this policy
func (*PolycubeNetworkPolicyTarget) DeepCopy ¶
func (in *PolycubeNetworkPolicyTarget) DeepCopy() *PolycubeNetworkPolicyTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyTarget.
func (*PolycubeNetworkPolicyTarget) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyTarget) DeepCopyInto(out *PolycubeNetworkPolicyTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolycubeNetworkPolicyTargetObject ¶
type PolycubeNetworkPolicyTargetObject string
PolycubeNetworkPolicyTargetObject is the target object
const ( // PodTarget represents a Pod PodTarget PolycubeNetworkPolicyTargetObject = "pod" // ServiceTarget represents a Service ServiceTarget PolycubeNetworkPolicyTargetObject = "service" )
type PolycubeNetworkPolicyWithIP ¶
type PolycubeNetworkPolicyWithIP struct { // List is a list of IPs in CIDR notation List []string `json:"list,omitempty"` }
PolycubeNetworkPolicyWithIP is the IP container
func (*PolycubeNetworkPolicyWithIP) DeepCopy ¶
func (in *PolycubeNetworkPolicyWithIP) DeepCopy() *PolycubeNetworkPolicyWithIP
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyWithIP.
func (*PolycubeNetworkPolicyWithIP) DeepCopyInto ¶
func (in *PolycubeNetworkPolicyWithIP) DeepCopyInto(out *PolycubeNetworkPolicyWithIP)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.