v1

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the networking v1 API group +kubebuilder:object:generate=true +groupName=networking.alibaba.com

Index

Constants

View Source
const (
	NetworkTypeUnderlay = NetworkType("Underlay")
	NetworkTypeOverlay  = NetworkType("Overlay")
)
View Source
const (
	NetworkModeBGP   = NetworkMode("BGP")
	NetworkModeVlan  = NetworkMode("VLAN")
	NetworkModeVxlan = NetworkMode("VXLAN")
)
View Source
const (
	IPv4 = IPVersion("4")
	IPv6 = IPVersion("6")
)
View Source
const (
	IPPhaseUsing    = IPPhase("Using")
	IPPhaseReserved = IPPhase("Reserved")
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "networking.alibaba.com", Version: "v1"}

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

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func CalculateCapacity

func CalculateCapacity(ar *AddressRange) int64

func IsAvailable added in v0.4.0

func IsAvailable(statistics *Count) bool

func IsIPv6IPInstance added in v0.4.0

func IsIPv6IPInstance(ip *IPInstance) bool

func IsIPv6Subnet

func IsIPv6Subnet(subnet *Subnet) bool

func IsPrivateSubnet

func IsPrivateSubnet(subnet *Subnet) bool

func IsSubnetAutoNatOutgoing

func IsSubnetAutoNatOutgoing(subnetSpec *SubnetSpec) bool

func ValidateAddressRange

func ValidateAddressRange(ar *AddressRange) (err error)

Types

type Address

type Address struct {
	// +kubebuilder:validation:Required
	Version IPVersion `json:"version"`
	// +kubebuilder:validation:Required
	IP string `json:"ip"`
	// +kubebuilder:validation:Optional
	Gateway string `json:"gateway,omitempty"`
	// +kubebuilder:validation:Required
	NetID *int32 `json:"netID"`
	// +kubebuilder:validation:Required
	MAC string `json:"mac"`
}

func (*Address) DeepCopy

func (in *Address) DeepCopy() *Address

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

func (*Address) DeepCopyInto

func (in *Address) DeepCopyInto(out *Address)

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

type AddressRange

type AddressRange struct {
	// +kubebuilder:validation:Required
	Version IPVersion `json:"version"`
	// +kubebuilder:validation:Optional
	Start string `json:"start,omitempty"`
	// +kubebuilder:validation:Optional
	End string `json:"end,omitempty"`
	// +kubebuilder:validation:Required
	CIDR string `json:"cidr"`
	// +kubebuilder:validation:Optional
	Gateway string `json:"gateway"`
	// +kubebuilder:validation:Optional
	ReservedIPs []string `json:"reservedIPs,omitempty"`
	// +kubebuilder:validation:Optional
	ExcludeIPs []string `json:"excludeIPs,omitempty"`
}

func (*AddressRange) DeepCopy

func (in *AddressRange) DeepCopy() *AddressRange

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

func (*AddressRange) DeepCopyInto

func (in *AddressRange) DeepCopyInto(out *AddressRange)

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

type BGPPeer added in v0.4.0

type BGPPeer struct {
	// +kubebuilder:validation:Required
	ASN int32 `json:"asn"`
	// +kubebuilder:validation:Required
	Address string `json:"address"`
	// +kubebuilder:validation:Optional
	GracefulRestartSeconds int32 `json:"gracefulRestartSeconds,omitempty"`
	// +kubebuilder:validation:Optional
	Password string `json:"password,omitempty"`
}

func (*BGPPeer) DeepCopy added in v0.4.0

func (in *BGPPeer) DeepCopy() *BGPPeer

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

func (*BGPPeer) DeepCopyInto added in v0.4.0

func (in *BGPPeer) DeepCopyInto(out *BGPPeer)

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

type Count

type Count struct {
	// +kubebuilder:validation:Optional
	Total int32 `json:"total"`
	// +kubebuilder:validation:Optional
	Used int32 `json:"used"`
	// +kubebuilder:validation:Optional
	Available int32 `json:"available"`
}

func (*Count) DeepCopy

func (in *Count) DeepCopy() *Count

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

func (*Count) DeepCopyInto

func (in *Count) DeepCopyInto(out *Count)

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

type IPInstance

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

	Spec   IPInstanceSpec   `json:"spec,omitempty"`
	Status IPInstanceStatus `json:"status,omitempty"`
}

IPInstance is the Schema for the ipinstances API

func (*IPInstance) DeepCopy

func (in *IPInstance) DeepCopy() *IPInstance

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

func (*IPInstance) DeepCopyInto

func (in *IPInstance) DeepCopyInto(out *IPInstance)

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

func (*IPInstance) DeepCopyObject

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

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

type IPInstanceList

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

IPInstanceList contains a list of IPInstance

func (*IPInstanceList) DeepCopy

func (in *IPInstanceList) DeepCopy() *IPInstanceList

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

func (*IPInstanceList) DeepCopyInto

func (in *IPInstanceList) DeepCopyInto(out *IPInstanceList)

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

func (*IPInstanceList) DeepCopyObject

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

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

type IPInstanceSpec

type IPInstanceSpec struct {
	// +kubebuilder:validation:Required
	Network string `json:"network"`
	// +kubebuilder:validation:Required
	Subnet string `json:"subnet"`
	// +kubebuilder:validation:Required
	Address Address `json:"address"`
}

IPInstanceSpec defines the desired state of IPInstance

func (*IPInstanceSpec) DeepCopy

func (in *IPInstanceSpec) DeepCopy() *IPInstanceSpec

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

func (*IPInstanceSpec) DeepCopyInto

func (in *IPInstanceSpec) DeepCopyInto(out *IPInstanceSpec)

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

type IPInstanceStatus

type IPInstanceStatus struct {
	// +kubebuilder:validation:Optional
	NodeName string `json:"nodeName"`
	// +kubebuilder:validation:Optional
	Phase IPPhase `json:"phase"`
	// +kubebuilder:validation:Optional
	PodName string `json:"podName"`
	// +kubebuilder:validation:Optional
	PodNamespace string `json:"podNamespace"`
	// +kubebuilder:validation:Optional
	SandboxID string `json:"sandboxID"`
}

IPInstanceStatus defines the observed state of IPInstance

func (*IPInstanceStatus) DeepCopy

func (in *IPInstanceStatus) DeepCopy() *IPInstanceStatus

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

func (*IPInstanceStatus) DeepCopyInto

func (in *IPInstanceStatus) DeepCopyInto(out *IPInstanceStatus)

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

type IPPhase

type IPPhase string

type IPVersion

type IPVersion string

type Network

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

	Spec   NetworkSpec   `json:"spec,omitempty"`
	Status NetworkStatus `json:"status,omitempty"`
}

Network is the Schema for the networks API

func (*Network) DeepCopy

func (in *Network) DeepCopy() *Network

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

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

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

func (*Network) DeepCopyObject

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

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

type NetworkConfig added in v0.4.0

type NetworkConfig struct {
	// +kubebuilder:validation:Optional
	BGPPeers []BGPPeer `json:"bgpPeers,omitempty"`
}

func (*NetworkConfig) DeepCopy added in v0.4.0

func (in *NetworkConfig) DeepCopy() *NetworkConfig

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

func (*NetworkConfig) DeepCopyInto added in v0.4.0

func (in *NetworkConfig) DeepCopyInto(out *NetworkConfig)

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

type NetworkList

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

NetworkList contains a list of Network

func (*NetworkList) DeepCopy

func (in *NetworkList) DeepCopy() *NetworkList

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

func (*NetworkList) DeepCopyInto

func (in *NetworkList) DeepCopyInto(out *NetworkList)

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

func (*NetworkList) DeepCopyObject

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

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

type NetworkMode added in v0.4.0

type NetworkMode string

func GetNetworkMode added in v0.4.0

func GetNetworkMode(networkObj *Network) NetworkMode

type NetworkSpec

type NetworkSpec struct {
	// +kubebuilder:validation:Optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// +kubebuilder:validation:Optional
	NetID *int32 `json:"netID"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Type=string
	// Deprecated, will be removed in v0.5.0
	SwitchID string `json:"switchID"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Type=string
	Type NetworkType `json:"type,omitempty"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Type=string
	Mode NetworkMode `json:"mode,omitempty"`
	// +kubebuilder:validation:Optional
	Config *NetworkConfig `json:"config,omitempty"`
}

NetworkSpec defines the desired state of Network

func (*NetworkSpec) DeepCopy

func (in *NetworkSpec) DeepCopy() *NetworkSpec

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

func (*NetworkSpec) DeepCopyInto

func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)

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

type NetworkStatus

type NetworkStatus struct {
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Type=string
	LastAllocatedSubnet string `json:"lastAllocatedSubnet"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Type=string
	LastAllocatedIPv6Subnet string `json:"lastAllocatedIPv6Subnet,omitempty"`
	// +kubebuilder:validation:Optional
	SubnetList []string `json:"subnetList"`
	// +kubebuilder:validation:Optional
	NodeList []string `json:"nodeList"`
	// +kubebuilder:validation:Optional
	Statistics *Count `json:"statistics"`
	// +kubebuilder:validation:Optional
	IPv6Statistics *Count `json:"ipv6Statistics,omitempty"`
	// +kubebuilder:validation:Optional
	DualStackStatistics *Count `json:"dualStackStatistics,omitempty"`
}

NetworkStatus defines the observed state of Network

func (*NetworkStatus) DeepCopy

func (in *NetworkStatus) DeepCopy() *NetworkStatus

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

func (*NetworkStatus) DeepCopyInto

func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus)

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

type NetworkType

type NetworkType string

func GetNetworkType

func GetNetworkType(networkObj *Network) NetworkType

type Subnet

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

	Spec   SubnetSpec   `json:"spec,omitempty"`
	Status SubnetStatus `json:"status,omitempty"`
}

Subnet is the Schema for the subnets API

func (*Subnet) DeepCopy

func (in *Subnet) DeepCopy() *Subnet

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

func (*Subnet) DeepCopyInto

func (in *Subnet) DeepCopyInto(out *Subnet)

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

func (*Subnet) DeepCopyObject

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

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

type SubnetConfig

type SubnetConfig struct {
	// +kubebuilder:validation:Optional
	GatewayType string `json:"gatewayType"`
	// +kubebuilder:validation:Optional
	GatewayNode string `json:"gatewayNode"`
	// +kubebuilder:validation:Optional
	AutoNatOutgoing *bool `json:"autoNatOutgoing"`
	// +kubebuilder:validation:Optional
	Private *bool `json:"private"`
	// +kubebuilder:validation:Optional
	AllowSubnets []string `json:"allowSubnets"`
}

func (*SubnetConfig) DeepCopy

func (in *SubnetConfig) DeepCopy() *SubnetConfig

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

func (*SubnetConfig) DeepCopyInto

func (in *SubnetConfig) DeepCopyInto(out *SubnetConfig)

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

type SubnetList

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

SubnetList contains a list of Subnet

func (*SubnetList) DeepCopy

func (in *SubnetList) DeepCopy() *SubnetList

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

func (*SubnetList) DeepCopyInto

func (in *SubnetList) DeepCopyInto(out *SubnetList)

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

func (*SubnetList) DeepCopyObject

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

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

type SubnetSpec

type SubnetSpec struct {
	// +kubebuilder:validation:Required
	Range AddressRange `json:"range"`
	// +kubebuilder:validation:Optional
	NetID *int32 `json:"netID"`
	// +kubebuilder:validation:Required
	Network string `json:"network"`
	// +kubebuilder:validation:Optional
	Config *SubnetConfig `json:"config"`
}

SubnetSpec defines the desired state of Subnet

func (*SubnetSpec) DeepCopy

func (in *SubnetSpec) DeepCopy() *SubnetSpec

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

func (*SubnetSpec) DeepCopyInto

func (in *SubnetSpec) DeepCopyInto(out *SubnetSpec)

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

type SubnetStatus

type SubnetStatus struct {
	// +kubebuilder:validation:Optional
	Count `json:",inline"`
	// +kubebuilder:validation:Optional
	LastAllocatedIP string `json:"lastAllocatedIP"`
}

SubnetStatus defines the observed state of Subnet

func (*SubnetStatus) DeepCopy

func (in *SubnetStatus) DeepCopy() *SubnetStatus

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

func (*SubnetStatus) DeepCopyInto

func (in *SubnetStatus) DeepCopyInto(out *SubnetStatus)

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