v1alpha1

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 15 Imported by: 15

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the network v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/fearlesschenc/kubesphere/pkg/apis/network +k8s:defaulter-gen=TypeMeta +groupName=network.kubesphere.io

Package v1alpha1 contains API Schema definitions for the network v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/fearlesschenc/kubesphere/pkg/apis/network +k8s:defaulter-gen=TypeMeta +groupName=network.kubesphere.io

Index

Constants

View Source
const (
	ResourceKindIPAMBlock     = "IPAMBlock"
	ResourceSingularIPAMBlock = "ipamblock"
	ResourcePluralIPAMBlock   = "ipamblocks"

	IPAMBlockAttributePod          = "pod"
	IPAMBlockAttributeVm           = "vm"
	IPAMBlockAttributeWorkloadType = "workload-type"
	IPAMBlockAttributeNamespace    = "namespace"
	IPAMBlockAttributeWorkspace    = "workspace"
	IPAMBlockAttributeNode         = "node"
	IPAMBlockAttributePool         = "pool-name"
	IPAMBlockAttributeType         = "pool-type"

	ReservedHandle = "kubesphere-reserved-handle"
	ReservedNote   = "kubesphere reserved"
)
View Source
const (
	ResourceKindIPAMHandle     = "IPAMHandle"
	ResourceSingularIPAMHandle = "ipamhandle"
	ResourcePluralIPAMHandle   = "ipamhandles"
)
View Source
const (
	ResourceKindIPPool     = "IPPool"
	ResourceSingularIPPool = "ippool"
	ResourcePluralIPPool   = "ippools"

	// scope type > id > name
	// id used to detect cidr overlap
	IPPoolTypeLabel = "ippool.network.kubesphere.io/type"
	IPPoolNameLabel = "ippool.network.kubesphere.io/name"
	IPPoolIDLabel   = "ippool.network.kubesphere.io/id"
)
View Source
const (
	VLAN        = "vlan"
	Calico      = "calico"
	Porter      = "porter"
	Pod         = "pod"
	VLANIDStart = 1
	VLANIDEnd   = 4097
	PorterID    = 4098
	CalicoID    = 4099
	PodID       = 0
)
View Source
const (
	ResourceKindNamespaceNetworkPolicy     = "NamespaceNetworkPolicy"
	ResourceSingularNamespaceNetworkPolicy = "namespacenetworkpolicy"
	ResourcePluralNamespaceNetworkPolicy   = "namespacenetworkpolicies"
)
View Source
const IPPoolFinalizer = "finalizers.network.kubesphere.io/ippool"

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "network.kubesphere.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme is required by pkg/client/...
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func ConvertToBlockName

func ConvertToBlockName(k string) string

func Resource

func Resource(resource string) schema.GroupResource

Resource is required by pkg/client/listers/...

Types

type AllocationAttribute

type AllocationAttribute struct {
	AttrPrimary   string            `json:"handle_id,omitempty"`
	AttrSecondary map[string]string `json:"secondary,omitempty"`
}

func (*AllocationAttribute) DeepCopy

func (in *AllocationAttribute) DeepCopy() *AllocationAttribute

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

func (*AllocationAttribute) DeepCopyInto

func (in *AllocationAttribute) DeepCopyInto(out *AllocationAttribute)

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

type DNS

type DNS struct {
	Nameservers []string `json:"nameservers,omitempty"`
	Domain      string   `json:"domain,omitempty"`
	Search      []string `json:"search,omitempty"`
	Options     []string `json:"options,omitempty"`
}

DNS contains values interesting for DNS resolvers

func (*DNS) DeepCopy

func (in *DNS) DeepCopy() *DNS

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

func (*DNS) DeepCopyInto

func (in *DNS) DeepCopyInto(out *DNS)

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

type IPAMBlock

type IPAMBlock struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Specification of the IPAMBlock.
	Spec IPAMBlockSpec `json:"spec,omitempty"`
}

+genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=true +kubebuilder:resource:scope=Cluster

func NewBlock

func NewBlock(pool *IPPool, cidr cnet.IPNet, rsvdAttr *ReservedAttr) *IPAMBlock

This just initializes the data structure and does not call the api to create

func (*IPAMBlock) AutoAssign

func (b *IPAMBlock) AutoAssign(
	num int, handleID string, attrs map[string]string) []cnet.IPNet

The caller needs to check that the returned slice length is correct.

func (*IPAMBlock) BlockName

func (b *IPAMBlock) BlockName() string

func (*IPAMBlock) DeepCopy

func (in *IPAMBlock) DeepCopy() *IPAMBlock

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

func (*IPAMBlock) DeepCopyInto

func (in *IPAMBlock) DeepCopyInto(out *IPAMBlock)

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

func (*IPAMBlock) DeepCopyObject

func (in *IPAMBlock) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*IPAMBlock) Empty

func (b *IPAMBlock) Empty() bool

empty returns true if the block has released all of its assignable addresses, and returns false if any assignable addresses are in use.

func (*IPAMBlock) ID

func (b *IPAMBlock) ID() uint32

func (*IPAMBlock) IPToOrdinal

func (b *IPAMBlock) IPToOrdinal(ip cnet.IP) (int, error)

Find the ordinal (i.e. how far into the block) a given IP lies. Returns an error if the IP is outside the block.

func (*IPAMBlock) IsDeleted

func (b *IPAMBlock) IsDeleted() bool

func (*IPAMBlock) MarkDeleted

func (b *IPAMBlock) MarkDeleted()

func (*IPAMBlock) NumAddresses

func (b *IPAMBlock) NumAddresses() int

Get number of addresses covered by the block

func (*IPAMBlock) NumFreeAddresses

func (b *IPAMBlock) NumFreeAddresses() int

func (*IPAMBlock) NumReservedAddresses

func (b *IPAMBlock) NumReservedAddresses() int

func (*IPAMBlock) ReleaseByHandle

func (b *IPAMBlock) ReleaseByHandle(handleID string) int

func (*IPAMBlock) String

func (b *IPAMBlock) String() string

type IPAMBlockList

type IPAMBlockList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []IPAMBlock `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient:nonNamespaced

func (*IPAMBlockList) DeepCopy

func (in *IPAMBlockList) DeepCopy() *IPAMBlockList

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

func (*IPAMBlockList) DeepCopyInto

func (in *IPAMBlockList) DeepCopyInto(out *IPAMBlockList)

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

func (*IPAMBlockList) DeepCopyObject

func (in *IPAMBlockList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IPAMBlockSpec

type IPAMBlockSpec struct {
	ID          uint32                `json:"id"`
	CIDR        string                `json:"cidr"`
	Allocations []*int                `json:"allocations"`
	Unallocated []int                 `json:"unallocated"`
	Attributes  []AllocationAttribute `json:"attributes"`
	Deleted     bool                  `json:"deleted"`
}

IPAMBlockSpec contains the specification for an IPAMBlock resource.

func (*IPAMBlockSpec) DeepCopy

func (in *IPAMBlockSpec) DeepCopy() *IPAMBlockSpec

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

func (*IPAMBlockSpec) DeepCopyInto

func (in *IPAMBlockSpec) DeepCopyInto(out *IPAMBlockSpec)

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

type IPAMHandle

type IPAMHandle struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Specification of the IPAMHandle.
	Spec IPAMHandleSpec `json:"spec,omitempty"`
}

+genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=true +kubebuilder:resource:scope=Cluster

func (*IPAMHandle) DecrementBlock

func (h *IPAMHandle) DecrementBlock(block *IPAMBlock, num int) (*int, error)

func (*IPAMHandle) DeepCopy

func (in *IPAMHandle) DeepCopy() *IPAMHandle

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

func (*IPAMHandle) DeepCopyInto

func (in *IPAMHandle) DeepCopyInto(out *IPAMHandle)

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

func (*IPAMHandle) DeepCopyObject

func (in *IPAMHandle) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*IPAMHandle) Empty

func (h *IPAMHandle) Empty() bool

func (*IPAMHandle) IncrementBlock

func (h *IPAMHandle) IncrementBlock(block *IPAMBlock, num int) int

func (*IPAMHandle) IsDeleted

func (h *IPAMHandle) IsDeleted() bool

func (*IPAMHandle) MarkDeleted

func (h *IPAMHandle) MarkDeleted()

type IPAMHandleList

type IPAMHandleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []IPAMHandle `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient:nonNamespaced

func (*IPAMHandleList) DeepCopy

func (in *IPAMHandleList) DeepCopy() *IPAMHandleList

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

func (*IPAMHandleList) DeepCopyInto

func (in *IPAMHandleList) DeepCopyInto(out *IPAMHandleList)

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

func (*IPAMHandleList) DeepCopyObject

func (in *IPAMHandleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IPAMHandleSpec

type IPAMHandleSpec struct {
	HandleID string         `json:"handleID"`
	Block    map[string]int `json:"block"`
	Deleted  bool           `json:"deleted"`
}

IPAMHandleSpec contains the specification for an IPAMHandle resource.

func (*IPAMHandleSpec) DeepCopy

func (in *IPAMHandleSpec) DeepCopy() *IPAMHandleSpec

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

func (*IPAMHandleSpec) DeepCopyInto

func (in *IPAMHandleSpec) DeepCopyInto(out *IPAMHandleSpec)

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

type IPPool

type IPPool struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// +optional
	Spec IPPoolSpec `json:"spec,omitempty"`
	// +optional
	Status IPPoolStatus `json:"status,omitempty"`
}

+genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +k8s:openapi-gen=true +kubebuilder:resource:scope=Cluster

func (*IPPool) DeepCopy

func (in *IPPool) DeepCopy() *IPPool

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

func (*IPPool) DeepCopyInto

func (in *IPPool) DeepCopyInto(out *IPPool)

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

func (*IPPool) DeepCopyObject

func (in *IPPool) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (IPPool) Disabled

func (p IPPool) Disabled() bool

func (IPPool) EndReservedAddressed

func (b IPPool) EndReservedAddressed() int

func (IPPool) ID

func (pool IPPool) ID() uint32

func (IPPool) IPToOrdinal

func (b IPPool) IPToOrdinal(ip cnet.IP) (int, error)

Find the ordinal (i.e. how far into the block) a given IP lies. Returns an error if the IP is outside the block.

func (IPPool) NumAddresses

func (b IPPool) NumAddresses() int

Get number of addresses covered by the block

func (IPPool) NumReservedAddresses

func (b IPPool) NumReservedAddresses() int

func (IPPool) StartReservedAddressed

func (b IPPool) StartReservedAddressed() int

func (IPPool) TypeInvalid

func (p IPPool) TypeInvalid() bool

func (IPPool) V4

func (p IPPool) V4() bool

type IPPoolList

type IPPoolList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []IPPool `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient:nonNamespaced

func (*IPPoolList) DeepCopy

func (in *IPPoolList) DeepCopy() *IPPoolList

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

func (*IPPoolList) DeepCopyInto

func (in *IPPoolList) DeepCopyInto(out *IPPoolList)

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

func (*IPPoolList) DeepCopyObject

func (in *IPPoolList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IPPoolSpec

type IPPoolSpec struct {
	Type string `json:"type"`

	// The pool CIDR.
	CIDR string `json:"cidr"`

	// The first ip, inclusive
	RangeStart string `json:"rangeStart,omitempty"`

	// The last ip, inclusive
	RangeEnd string `json:"rangeEnd,omitempty"`

	// When disabled is true, IPAM will not assign addresses from this pool.
	Disabled bool `json:"disabled,omitempty"`

	// The block size to use for IP address assignments from this pool. Defaults to 26 for IPv4 and 112 for IPv6.
	BlockSize int `json:"blockSize,omitempty"`

	VLAN VLANConfig `json:"vlanConfig,omitempty"`

	Gateway string  `json:"gateway,omitempty"`
	Routes  []Route `json:"routes,omitempty"`
	DNS     DNS     `json:"dns,omitempty"`

	Workspace string `json:"workspace,omitempty"`
	Namespace string `json:"namespace,omitempty"`
}

func (*IPPoolSpec) DeepCopy

func (in *IPPoolSpec) DeepCopy() *IPPoolSpec

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

func (*IPPoolSpec) DeepCopyInto

func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec)

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

type IPPoolStatus

type IPPoolStatus struct {
	Unallocated int  `json:"unallocated,omitempty"`
	Allocations int  `json:"allocations,omitempty"`
	Capacity    int  `json:"capacity,omitempty"`
	Reserved    int  `json:"reserved,omitempty"`
	Synced      bool `json:"synced,omitempty"`
}

func (*IPPoolStatus) DeepCopy

func (in *IPPoolStatus) DeepCopy() *IPPoolStatus

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

func (*IPPoolStatus) DeepCopyInto

func (in *IPPoolStatus) DeepCopyInto(out *IPPoolStatus)

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

type NamespaceNetworkPolicy

type NamespaceNetworkPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec NamespaceNetworkPolicySpec `json:"spec,omitempty"`
}

NamespaceNetworkPolicy is the Schema for the namespacenetworkpolicies API +k8s:openapi-gen=true +kubebuilder:resource:categories="networking",shortName="nsnp"

func (*NamespaceNetworkPolicy) DeepCopy

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

func (*NamespaceNetworkPolicy) DeepCopyInto

func (in *NamespaceNetworkPolicy) DeepCopyInto(out *NamespaceNetworkPolicy)

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

func (*NamespaceNetworkPolicy) DeepCopyObject

func (in *NamespaceNetworkPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NamespaceNetworkPolicyList

type NamespaceNetworkPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NamespaceNetworkPolicy `json:"items"`
}

NamespaceNetworkPolicyList contains a list of NamespaceNetworkPolicy

func (*NamespaceNetworkPolicyList) DeepCopy

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

func (*NamespaceNetworkPolicyList) DeepCopyInto

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

func (*NamespaceNetworkPolicyList) DeepCopyObject

func (in *NamespaceNetworkPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NamespaceNetworkPolicySpec

type NamespaceNetworkPolicySpec struct {
	// List of ingress rules to be applied to the selected pods. Traffic is allowed to
	// a pod if there are no NetworkPolicies selecting the pod
	// (and cluster policy otherwise allows the traffic), OR if the traffic source is
	// the pod's local node, OR if the traffic matches at least one ingress rule
	// across all of the NetworkPolicy objects whose podSelector matches the pod. If
	// this field is empty then this NetworkPolicy does not allow any traffic (and serves
	// solely to ensure that the pods it selects are isolated by default)
	// +optional
	Ingress []NetworkPolicyIngressRule `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"`

	// List of egress rules to be applied to the selected pods. Outgoing traffic is
	// allowed if there are no NetworkPolicies selecting the pod (and cluster policy
	// otherwise allows the traffic), OR if the traffic matches at least one egress rule
	// across all of the NetworkPolicy objects whose podSelector matches the pod. If
	// this field is empty then this NetworkPolicy limits all outgoing traffic (and serves
	// solely to ensure that the pods it selects are isolated by default).
	// This field is beta-level in 1.8
	// +optional
	Egress []NetworkPolicyEgressRule `json:"egress,omitempty" protobuf:"bytes,2,rep,name=egress"`

	// List of rule types that the NetworkPolicy relates to.
	// Valid options are "Ingress", "Egress", or "Ingress,Egress".
	// If this field is not specified, it will default based on the existence of Ingress or Egress rules;
	// policies that contain an Egress section are assumed to affect Egress, and all policies
	// (whether or not they contain an Ingress section) are assumed to affect Ingress.
	// If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ].
	// Likewise, if you want to write a policy that specifies that no egress is allowed,
	// you must specify a policyTypes value that include "Egress" (since such a policy would not include
	// an Egress section and would otherwise default to just [ "Ingress" ]).
	// This field is beta-level in 1.8
	// +optional
	PolicyTypes []k8snet.PolicyType `json:"policyTypes,omitempty" protobuf:"bytes,3,rep,name=policyTypes,casttype=PolicyType"`
}

NamespaceNetworkPolicySpec provides the specification of a NamespaceNetworkPolicy

func (*NamespaceNetworkPolicySpec) DeepCopy

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

func (*NamespaceNetworkPolicySpec) DeepCopyInto

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

type NamespaceSelector

type NamespaceSelector struct {
	Name string `json:"name" protobuf:"bytes,1,name=name"`
}

func (*NamespaceSelector) DeepCopy

func (in *NamespaceSelector) DeepCopy() *NamespaceSelector

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

func (*NamespaceSelector) DeepCopyInto

func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)

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

type NetworkPolicyEgressRule

type NetworkPolicyEgressRule struct {
	// List of destination ports for outgoing traffic.
	// Each item in this list is combined using a logical OR. If this field is
	// empty or missing, this rule matches all ports (traffic not restricted by port).
	// If this field is present and contains at least one item, then this rule allows
	// traffic only if the traffic matches at least one port in the list.
	// +optional
	Ports []k8snet.NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`

	// List of destinations for outgoing traffic of pods selected for this rule.
	// Items in this list are combined using a logical OR operation. If this field is
	// empty or missing, this rule matches all destinations (traffic not restricted by
	// destination). If this field is present and contains at least one item, this rule
	// allows traffic only if the traffic matches at least one item in the to list.
	// +optional
	To []NetworkPolicyPeer `json:"to,omitempty" protobuf:"bytes,2,rep,name=to"`
}

NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and to. This type is beta-level in 1.8

func (*NetworkPolicyEgressRule) DeepCopy

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

func (*NetworkPolicyEgressRule) DeepCopyInto

func (in *NetworkPolicyEgressRule) DeepCopyInto(out *NetworkPolicyEgressRule)

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

type NetworkPolicyIngressRule

type NetworkPolicyIngressRule struct {
	// List of ports which should be made accessible on the pods selected for this
	// rule. Each item in this list is combined using a logical OR. If this field is
	// empty or missing, this rule matches all ports (traffic not restricted by port).
	// If this field is present and contains at least one item, then this rule allows
	// traffic only if the traffic matches at least one port in the list.
	// +optional
	Ports []k8snet.NetworkPolicyPort `json:"ports,omitempty" protobuf:"bytes,1,rep,name=ports"`

	// List of sources which should be able to access the pods selected for this rule.
	// Items in this list are combined using a logical OR operation. If this field is
	// empty or missing, this rule matches all sources (traffic not restricted by
	// source). If this field is present and contains at least one item, this rule
	// allows traffic only if the traffic matches at least one item in the from list.
	// +optional
	From []NetworkPolicyPeer `json:"from,omitempty" protobuf:"bytes,2,rep,name=from"`
}

NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The traffic must match both ports and from.

func (*NetworkPolicyIngressRule) DeepCopy

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

func (*NetworkPolicyIngressRule) DeepCopyInto

func (in *NetworkPolicyIngressRule) DeepCopyInto(out *NetworkPolicyIngressRule)

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

type NetworkPolicyPeer

type NetworkPolicyPeer struct {
	// +optional
	NamespaceSelector *NamespaceSelector `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`

	// IPBlock defines policy on a particular IPBlock. If this field is set then
	// neither of the other fields can be.
	// +optional
	IPBlock *k8snet.IPBlock `json:"ipBlock,omitempty" protobuf:"bytes,2,rep,name=ipBlock"`

	ServiceSelector *ServiceSelector `json:"service,omitempty" protobuf:"bytes,3,opt,name=service"`
}

NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed

func (*NetworkPolicyPeer) DeepCopy

func (in *NetworkPolicyPeer) DeepCopy() *NetworkPolicyPeer

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

func (*NetworkPolicyPeer) DeepCopyInto

func (in *NetworkPolicyPeer) DeepCopyInto(out *NetworkPolicyPeer)

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

type ReservedAttr

type ReservedAttr struct {
	// Number of addresses reserved from start of the block.
	StartOfBlock int

	// Number of addresses reserved from end of the block.
	EndOfBlock int

	// Handle for reserved addresses.
	Handle string

	// A description about the reserves.
	Note string
}

func (*ReservedAttr) DeepCopy

func (in *ReservedAttr) DeepCopy() *ReservedAttr

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

func (*ReservedAttr) DeepCopyInto

func (in *ReservedAttr) DeepCopyInto(out *ReservedAttr)

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

type Route

type Route struct {
	Dst string `json:"dst,omitempty"`
	GW  string `json:"gateway,omitempty"`
}

func (*Route) DeepCopy

func (in *Route) DeepCopy() *Route

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

func (*Route) DeepCopyInto

func (in *Route) DeepCopyInto(out *Route)

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

type ServiceSelector

type ServiceSelector struct {
	Name      string `json:"name" protobuf:"bytes,1,name=name"`
	Namespace string `json:"namespace" protobuf:"bytes,2,name=namespace"`
}

func (*ServiceSelector) DeepCopy

func (in *ServiceSelector) DeepCopy() *ServiceSelector

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

func (*ServiceSelector) DeepCopyInto

func (in *ServiceSelector) DeepCopyInto(out *ServiceSelector)

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

type VLANConfig

type VLANConfig struct {
	VlanId uint32 `json:"vlanId"`
	Master string `json:"master"`
}

func (*VLANConfig) DeepCopy

func (in *VLANConfig) DeepCopy() *VLANConfig

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

func (*VLANConfig) DeepCopyInto

func (in *VLANConfig) DeepCopyInto(out *VLANConfig)

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