Documentation
¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 contains API Schema definitions for the ipam v1alpha1 API group +kubebuilder:object:generate=true +groupName=ipam.metal.ironcore.dev
Index ¶
- Constants
- Variables
- func FindParentNetworkIdx(ranges []CIDR, cidr *CIDR, left int, right int) (int, error)
- func Resource(resource string) schema.GroupResource
- type CIDR
- func (in *CIDR) AddressCapacity() *big.Int
- func (in *CIDR) After(cidr *CIDR) bool
- func (in *CIDR) AsIPAddr() *IPAddr
- func (in *CIDR) Before(cidr *CIDR) bool
- func (in *CIDR) CanJoin(cidr *CIDR) bool
- func (in *CIDR) CanReserve(cidr *CIDR) bool
- func (in *CIDR) DeepCopy() *CIDR
- func (in *CIDR) DeepCopyInto(out *CIDR)
- func (in *CIDR) Equal(cidr *CIDR) bool
- func (in *CIDR) IsIPv4() bool
- func (in *CIDR) IsIPv6() bool
- func (in *CIDR) IsLeft() bool
- func (in *CIDR) IsRight() bool
- func (in *CIDR) Join(cidr *CIDR)
- func (in *CIDR) MarshalJSON() ([]byte, error)
- func (in *CIDR) MaskBits() byte
- func (in *CIDR) MaskCapacity() *big.Int
- func (in *CIDR) MaskOnes() byte
- func (in *CIDR) MaskZeroes() byte
- func (in *CIDR) Reserve(cidr *CIDR) []CIDR
- func (in *CIDR) String() string
- func (in *CIDR) ToAddressRange() (netip.Addr, netip.Addr)
- func (in *CIDR) UnmarshalJSON(b []byte) error
- type IP
- type IPAddr
- type IPList
- type IPSpec
- type IPState
- type IPStatus
- type Network
- func (in *Network) CanRelease(cidr *CIDR) bool
- func (in *Network) CanReserve(cidr *CIDR) bool
- func (in *Network) DeepCopy() *Network
- func (in *Network) DeepCopyInto(out *Network)
- func (in *Network) DeepCopyObject() runtime.Object
- func (in *Network) Release(cidr *CIDR) error
- func (in *Network) Reserve(cidr *CIDR) error
- type NetworkCounter
- type NetworkCounterList
- type NetworkCounterSpec
- func (in *NetworkCounterSpec) CanReserve(id *NetworkID) bool
- func (in *NetworkCounterSpec) DeepCopy() *NetworkCounterSpec
- func (in *NetworkCounterSpec) DeepCopyInto(out *NetworkCounterSpec)
- func (in *NetworkCounterSpec) Propose() (*NetworkID, error)
- func (in *NetworkCounterSpec) Release(id *NetworkID) error
- func (in *NetworkCounterSpec) Reserve(id *NetworkID) error
- type NetworkCounterStatus
- type NetworkID
- type NetworkIDInterval
- func (in *NetworkIDInterval) After(id *NetworkID) bool
- func (in *NetworkIDInterval) Before(id *NetworkID) bool
- func (in *NetworkIDInterval) CanJoinLeft(id *NetworkID) bool
- func (in *NetworkIDInterval) CanJoinRight(id *NetworkID) bool
- func (in *NetworkIDInterval) DeepCopy() *NetworkIDInterval
- func (in *NetworkIDInterval) DeepCopyInto(out *NetworkIDInterval)
- func (in *NetworkIDInterval) Includes(id *NetworkID) bool
- func (in *NetworkIDInterval) JoinLeft(id *NetworkID) bool
- func (in *NetworkIDInterval) JoinRight(id *NetworkID) bool
- func (in *NetworkIDInterval) Propose() *NetworkID
- func (in *NetworkIDInterval) Reserve(id *NetworkID) []NetworkIDInterval
- type NetworkList
- type NetworkSpec
- type NetworkState
- type NetworkStatus
- type NetworkType
- type Region
- type ResourceReference
- type Subnet
- func (in *Subnet) CanRelease(cidr *CIDR) bool
- func (in *Subnet) CanReserve(cidr *CIDR) bool
- func (in *Subnet) DeepCopy() *Subnet
- func (in *Subnet) DeepCopyInto(out *Subnet)
- func (in *Subnet) DeepCopyObject() runtime.Object
- func (in *Subnet) FillStatusFromCidr(cidr *CIDR)
- func (in *Subnet) PopulateStatus()
- func (in *Subnet) ProposeForBits(prefixBits byte) (*CIDR, error)
- func (in *Subnet) ProposeForCapacity(capacity *resource.Quantity) (*CIDR, error)
- func (in *Subnet) Release(cidr *CIDR) error
- func (in *Subnet) Reserve(cidr *CIDR) error
- type SubnetAddressType
- type SubnetList
- type SubnetLocalityType
- type SubnetSpec
- type SubnetState
- type SubnetStatus
Constants ¶
const ( IPv6SubnetType SubnetAddressType = "IPv6" IPv4SubnetType SubnetAddressType = "IPv4" LocalSubnetLocalityType SubnetLocalityType = "Local" RegionalSubnetLocalityType SubnetLocalityType = "Regional" MultiregionalSubnetLocalityType SubnetLocalityType = "Multiregional" FailedSubnetState SubnetState = "Failed" ProcessingSubnetState SubnetState = "Processing" FinishedSubnetState SubnetState = "Finished" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "ipam.metal.ironcore.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var GENEVEFirstAvaliableID = VXLANFirstAvaliableID
var GENEVEMaxID = VXLANMaxID
var Increment = big.NewInt(1)
var MPLSFirstAvailableID = NetworkIDFromBytes([]byte{15 + 1})
First 16 addresses (0-15) are reserved
var VXLANFirstAvaliableID = NetworkIDFromBytes([]byte{99 + 1})
First 100 addresses (0-99) are reserved
var VXLANMaxID = NetworkIDFromBytes([]byte{255, 255, 255})
Functions ¶
func FindParentNetworkIdx ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Types ¶
type CIDR ¶
+kubebuilder:validation:Type=string
func CIDRFromNet ¶
func CIDRFromString ¶
func CidrMustParse ¶ added in v0.2.3
func (*CIDR) AddressCapacity ¶
func (*CIDR) CanReserve ¶
func (*CIDR) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CIDR.
func (*CIDR) DeepCopyInto ¶
DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CIDR) MarshalJSON ¶
func (*CIDR) MaskCapacity ¶
func (*CIDR) MaskZeroes ¶
func (*CIDR) UnmarshalJSON ¶
type IP ¶
type IP struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec IPSpec `json:"spec,omitempty"`
Status IPStatus `json:"status,omitempty"`
}
IP is the Schema for the ips API
func (*IP) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IP.
func (*IP) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IP) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IPAddr ¶
+kubebuilder:validation:Type=string
func IPAddrFromString ¶
func IPMustParse ¶ added in v0.2.3
func (*IPAddr) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAddr.
func (*IPAddr) DeepCopyInto ¶
DeepCopyInto is a deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (IPAddr) MarshalJSON ¶
func (*IPAddr) UnmarshalJSON ¶
type IPList ¶
type IPList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []IP `json:"items"`
}
IPList contains a list of IP +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*IPList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPList.
func (*IPList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IPList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IPSpec ¶
type IPSpec struct {
// SubnetName is referring to parent subnet that holds requested IP
// +kubebuilder:validation:Required
Subnet v1.LocalObjectReference `json:"subnet"`
// Consumer refers to resource IP has been booked for
// +kubebuilder:validation:Optional
Consumer *ResourceReference `json:"consumer,omitempty"`
// IP allows to set desired IP address explicitly
// +kubebuilder:validation:Optional
IP *IPAddr `json:"ip,omitempty"`
}
IPSpec defines the desired state of IP
func (*IPSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPSpec.
func (*IPSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IPStatus ¶
type IPStatus struct {
// State is a network creation request processing state
State IPState `json:"state,omitempty"`
// Reserved is a reserved IP
Reserved *IPAddr `json:"reserved,omitempty"`
// Message contains error details if the one has occurred
Message string `json:"message,omitempty"`
}
IPStatus defines the observed state of IP
func (*IPStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPStatus.
func (*IPStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Type",type=string,JSONPath=`.spec.type`,description="Network Type" +kubebuilder:printcolumn:name="Reserved",type=string,JSONPath=`.status.reserved`,description="Reserved Network ID" +kubebuilder:printcolumn:name="IPv4 Capacity",type=string,JSONPath=`.status.ipv4Capacity`,description="Total IPv4 address capacity in all ranges" +kubebuilder:printcolumn:name="IPv6 Capacity",type=string,JSONPath=`.status.ipv6Capacity`,description="Total IPv4 address capacity in all ranges" +kubebuilder:printcolumn:name="Description",type=string,JSONPath=`.spec.description`,description="Description" +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.state`,description="Request state" +kubebuilder:printcolumn:name="Message",type=string,JSONPath=`.status.message`,description="Message about request processing resutls" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func NetworkFromCidrs ¶ added in v0.2.3
func (*Network) CanRelease ¶
func (*Network) CanReserve ¶
func (*Network) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (*Network) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Network) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkCounter ¶
type NetworkCounter struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec NetworkCounterSpec `json:"spec,omitempty"`
Status NetworkCounterStatus `json:"status,omitempty"`
}
NetworkCounter is the Schema for the networkcounters API
func (*NetworkCounter) DeepCopy ¶
func (in *NetworkCounter) DeepCopy() *NetworkCounter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCounter.
func (*NetworkCounter) DeepCopyInto ¶
func (in *NetworkCounter) DeepCopyInto(out *NetworkCounter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkCounter) DeepCopyObject ¶
func (in *NetworkCounter) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkCounterList ¶
type NetworkCounterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []NetworkCounter `json:"items"`
}
NetworkCounterList contains a list of NetworkCounter
func (*NetworkCounterList) DeepCopy ¶
func (in *NetworkCounterList) DeepCopy() *NetworkCounterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCounterList.
func (*NetworkCounterList) DeepCopyInto ¶
func (in *NetworkCounterList) DeepCopyInto(out *NetworkCounterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkCounterList) DeepCopyObject ¶
func (in *NetworkCounterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkCounterSpec ¶
type NetworkCounterSpec struct {
// Vacant is a list of unassigned network IDs.
Vacant []NetworkIDInterval `json:"vacant,omitempty"`
}
NetworkCounterSpec stores the state of assigned IDs for network type.
func NewNetworkCounterSpec ¶
func NewNetworkCounterSpec(typ NetworkType) *NetworkCounterSpec
func (*NetworkCounterSpec) CanReserve ¶
func (in *NetworkCounterSpec) CanReserve(id *NetworkID) bool
func (*NetworkCounterSpec) DeepCopy ¶
func (in *NetworkCounterSpec) DeepCopy() *NetworkCounterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCounterSpec.
func (*NetworkCounterSpec) DeepCopyInto ¶
func (in *NetworkCounterSpec) DeepCopyInto(out *NetworkCounterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkCounterSpec) Propose ¶
func (in *NetworkCounterSpec) Propose() (*NetworkID, error)
func (*NetworkCounterSpec) Release ¶
func (in *NetworkCounterSpec) Release(id *NetworkID) error
func (*NetworkCounterSpec) Reserve ¶
func (in *NetworkCounterSpec) Reserve(id *NetworkID) error
type NetworkCounterStatus ¶
type NetworkCounterStatus struct {
}
NetworkCounterStatus defines the observed state of NetworkCounter
func (*NetworkCounterStatus) DeepCopy ¶
func (in *NetworkCounterStatus) DeepCopy() *NetworkCounterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkCounterStatus.
func (*NetworkCounterStatus) DeepCopyInto ¶
func (in *NetworkCounterStatus) DeepCopyInto(out *NetworkCounterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkID ¶
NetworkID represents an incremental ID for network type. Effectively it is a wrapper around big.Int, as its Bytes() method allows to get unsigned big endian representation for the value.
func NetworkIDFromBigInt ¶
func NetworkIDFromBytes ¶
func NetworkIDFromInt64 ¶
func (*NetworkID) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkID.
func (*NetworkID) DeepCopyInto ¶
func (NetworkID) MarshalJSON ¶
func (*NetworkID) UnmarshalJSON ¶
type NetworkIDInterval ¶
type NetworkIDInterval struct {
// Begin is a first available value in interval
Begin *NetworkID `json:"begin,omitempty"`
// Exact represents a single value in interval
Exact *NetworkID `json:"exact,omitempty"`
// End is a last available value in interval
End *NetworkID `json:"end,omitempty"`
}
NetworkIDInterval represents inclusive interval for network IDs. Used to represent intervals of unassigned IDs.
func (*NetworkIDInterval) After ¶
func (in *NetworkIDInterval) After(id *NetworkID) bool
func (*NetworkIDInterval) Before ¶
func (in *NetworkIDInterval) Before(id *NetworkID) bool
func (*NetworkIDInterval) CanJoinLeft ¶
func (in *NetworkIDInterval) CanJoinLeft(id *NetworkID) bool
func (*NetworkIDInterval) CanJoinRight ¶
func (in *NetworkIDInterval) CanJoinRight(id *NetworkID) bool
func (*NetworkIDInterval) DeepCopy ¶
func (in *NetworkIDInterval) DeepCopy() *NetworkIDInterval
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkIDInterval.
func (*NetworkIDInterval) DeepCopyInto ¶
func (in *NetworkIDInterval) DeepCopyInto(out *NetworkIDInterval)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkIDInterval) Includes ¶
func (in *NetworkIDInterval) Includes(id *NetworkID) bool
func (*NetworkIDInterval) JoinLeft ¶
func (in *NetworkIDInterval) JoinLeft(id *NetworkID) bool
func (*NetworkIDInterval) JoinRight ¶
func (in *NetworkIDInterval) JoinRight(id *NetworkID) bool
func (*NetworkIDInterval) Propose ¶
func (in *NetworkIDInterval) Propose() *NetworkID
func (*NetworkIDInterval) Reserve ¶
func (in *NetworkIDInterval) Reserve(id *NetworkID) []NetworkIDInterval
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 NetworkSpec ¶
type NetworkSpec struct {
// ID is a unique network identifier.
// For VXLAN it is a single 24 bit value. First 100 values are reserved.
// For GENEVE it is a single 24 bit value. First 100 values are reserved.
// For MLPS it is a set of 20 bit values. First 16 values are reserved.
// Represented with number encoded to string.
// +kubebuilder:validation:Optional
ID *NetworkID `json:"id,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Enum=VXLAN;GENEVE;MPLS
Type NetworkType `json:"type,omitempty"`
// Description contains a human readable description of network
// +kubebuilder:validation:Optional
Description string `json:"description,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 NetworkState ¶
type NetworkState string
const ( CFailedNetworkState NetworkState = "Failed" CProcessingNetworkState NetworkState = "Processing" CFinishedNetworkState NetworkState = "Finished" )
type NetworkStatus ¶
type NetworkStatus struct {
// IPv4Ranges is a list of IPv4 ranges booked by child subnets
IPv4Ranges []CIDR `json:"ipv4Ranges,omitempty"`
// IPv6Ranges is a list of IPv6 ranges booked by child subnets
IPv6Ranges []CIDR `json:"ipv6Ranges,omitempty"`
// Reserved is a reserved network ID
Reserved *NetworkID `json:"reserved,omitempty"`
// IPv4Capacity is a total address capacity of all IPv4 CIDRs in Ranges
IPv4Capacity resource.Quantity `json:"ipv4Capacity,omitempty"`
// IPv6Capacity is a total address capacity of all IPv4 CIDRs in Ranges
IPv6Capacity resource.Quantity `json:"ipv6Capacity,omitempty"`
// State is a network creation request processing state
State NetworkState `json:"state,omitempty"`
// Message contains error details if the one has occurred
Message string `json:"message,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
NetworkType is a type of network id is assigned to.
const ( GENEVENetworkType NetworkType = "GENEVE" VXLANNetworkType NetworkType = "VXLAN" MPLSNetworkType NetworkType = "MPLS" )
type Region ¶
type Region struct {
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=^[a-z0-9]([-./a-z0-9]*[a-z0-9])?$
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
Name string `json:"name"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinItems=1
AvailabilityZones []string `json:"availabilityZones"`
}
func (*Region) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Region.
func (*Region) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceReference ¶
type ResourceReference struct {
// APIVersion is resource's API group
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Pattern=^[a-z0-9]([-./a-z0-9]*[a-z0-9])?$
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
APIVersion string `json:"apiVersion,omitempty"`
// Kind is CRD Kind for lookup
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=^[A-Z]([-A-Za-z0-9]*[A-Za-z0-9])?$
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
Kind string `json:"kind"`
// Name is CRD Name for lookup
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=63
Name string `json:"name"`
}
ResourceReference allows to refer a resource of particular type at the same namespace
func (*ResourceReference) DeepCopy ¶
func (in *ResourceReference) DeepCopy() *ResourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceReference.
func (*ResourceReference) DeepCopyInto ¶
func (in *ResourceReference) DeepCopyInto(out *ResourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 EmptySubnetFromCidr ¶ added in v0.2.3
func SubnetFromCidrs ¶ added in v0.2.3
func (*Subnet) CanRelease ¶
CanRelease checks whether it is possible to release CIDR into current vacant range
func (*Subnet) CanReserve ¶
CanReserve checks if it is possible to reserve CIDR
func (*Subnet) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subnet.
func (*Subnet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Subnet) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Subnet) FillStatusFromCidr ¶
func (*Subnet) PopulateStatus ¶
func (in *Subnet) PopulateStatus()
PopulateStatus fills status subresource with default values
func (*Subnet) ProposeForCapacity ¶
type SubnetAddressType ¶
type SubnetAddressType string
SubnetAddressType is a type (version) of IP protocol
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 SubnetLocalityType ¶
type SubnetLocalityType string
SubnetLocalityType is a type of subnet coverage
type SubnetSpec ¶
type SubnetSpec struct {
// CIDR represents the IP Address Range
// +kubebuilder:validation:Optional
CIDR *CIDR `json:"cidr,omitempty"`
// PrefixBits is an amount of ones zero bits at the beginning of the netmask
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=128
PrefixBits *byte `json:"prefixBits,omitempty"`
// Capacity is a desired amount of addresses; will be ceiled to the closest power of 2.
// +kubebuilder:validation:Optional
Capacity *resource.Quantity `json:"capacity,omitempty"`
// ParentSubnetName contains a reference (name) to the parent subent
// +kubebuilder:validation:Optional
ParentSubnet v1.LocalObjectReference `json:"parentSubnet,omitempty"`
// NetworkName contains a reference (name) to the network
// +kubebuilder:validation:Required
Network v1.LocalObjectReference `json:"network"`
// Regions represents the network service location
// +kubebuilder:validation:Optional
Regions []Region `json:"regions,omitempty"`
// Consumer refers to resource Subnet has been booked for
// +kubebuilder:validation:Optional
Consumer *ResourceReference `json:"consumer,omitempty"`
}
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 {
// Type represents whether CIDR is an IPv4 or IPv6
Type SubnetAddressType `json:"type,omitempty"`
// Locality represents subnet regional coverated
Locality SubnetLocalityType `json:"locality,omitempty"`
// PrefixBits is an amount of ones zero bits at the beginning of the netmask
PrefixBits byte `json:"prefixBits,omitempty"`
// Capacity shows total capacity of CIDR
Capacity resource.Quantity `json:"capacity,omitempty"`
// CapacityLeft shows remaining capacity (excluding capacity of child subnets)
CapacityLeft resource.Quantity `json:"capacityLeft,omitempty"`
// Reserved is a CIDR that was reserved
Reserved *CIDR `json:"reserved,omitempty"`
// Vacant shows CIDR ranges available for booking
Vacant []CIDR `json:"vacant,omitempty"`
// State represents the cunnet processing state
State SubnetState `json:"state,omitempty"`
// Message contains an error string for the failed State
Message string `json:"message,omitempty"`
}
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.