v1beta

package
v0.0.0-...-a143e3c Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
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

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyEgressRule.

func (*PolycubeNetworkPolicyEgressRule) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyEgressRuleContainer.

func (*PolycubeNetworkPolicyEgressRuleContainer) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyIngressRule.

func (*PolycubeNetworkPolicyIngressRule) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyIngressRuleContainer.

func (*PolycubeNetworkPolicyIngressRuleContainer) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyList.

func (*PolycubeNetworkPolicyList) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyNamespaceSelector.

func (*PolycubeNetworkPolicyNamespaceSelector) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyPeer.

func (*PolycubeNetworkPolicyPeer) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyPorts.

func (*PolycubeNetworkPolicyPorts) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyProtocolContainer.

func (*PolycubeNetworkPolicyProtocolContainer) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicySpec.

func (*PolycubeNetworkPolicySpec) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyTarget.

func (*PolycubeNetworkPolicyTarget) DeepCopyInto

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

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolycubeNetworkPolicyWithIP.

func (*PolycubeNetworkPolicyWithIP) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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