Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the networking v1alpha1 API group. +kubebuilder:object:generate=true +groupName=plexaubnet.io
Index ¶
- Constants
- Variables
- type ClaimReference
- type Subnet
- type SubnetClaim
- type SubnetClaimList
- type SubnetClaimPhase
- type SubnetClaimSpec
- type SubnetClaimStatus
- type SubnetList
- type SubnetPool
- type SubnetPoolClaim
- type SubnetPoolClaimList
- type SubnetPoolClaimPhase
- type SubnetPoolClaimSpec
- type SubnetPoolClaimStatus
- type SubnetPoolList
- type SubnetPoolSpec
- type SubnetPoolStatus
- type SubnetPoolStrategy
- type SubnetSpec
- type SubnetStatus
Constants ¶
const ( // SubnetPhasePending indicates the Subnet request has been accepted but not yet reflected in the Pool SubnetPhasePending = "Pending" // SubnetPhaseAllocated indicates the CIDR has been successfully allocated SubnetPhaseAllocated = "Allocated" // SubnetPhaseFailed indicates the allocation failed or there is an inconsistency SubnetPhaseFailed = "Failed" )
Subnet Phase constants
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "plexaubnet.io", Version: "v1alpha1"} // 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 ¶
This section is empty.
Types ¶
type ClaimReference ¶
type ClaimReference struct { // Name is the name of the SubnetClaim that requested this allocation // +optional Name string `json:"name,omitempty"` // UID is the UID of the SubnetClaim that requested this allocation // +optional UID string `json:"uid,omitempty"` }
ClaimReference contains information to identify the claim that led to this allocation
func (*ClaimReference) DeepCopy ¶
func (in *ClaimReference) DeepCopy() *ClaimReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimReference.
func (*ClaimReference) DeepCopyInto ¶
func (in *ClaimReference) DeepCopyInto(out *ClaimReference)
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 Subnet objects are immutable and should not be updated after creation
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.
type SubnetClaim ¶
type SubnetClaim struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SubnetClaimSpec `json:"spec,omitempty"` Status SubnetClaimStatus `json:"status,omitempty"` }
SubnetClaim is the Schema for the subnetclaims API
func (*SubnetClaim) DeepCopy ¶
func (in *SubnetClaim) DeepCopy() *SubnetClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetClaim.
func (*SubnetClaim) DeepCopyInto ¶
func (in *SubnetClaim) DeepCopyInto(out *SubnetClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SubnetClaim) DeepCopyObject ¶
func (in *SubnetClaim) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SubnetClaimList ¶
type SubnetClaimList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SubnetClaim `json:"items"` }
SubnetClaimList contains a list of SubnetClaim
func (*SubnetClaimList) DeepCopy ¶
func (in *SubnetClaimList) DeepCopy() *SubnetClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetClaimList.
func (*SubnetClaimList) DeepCopyInto ¶
func (in *SubnetClaimList) DeepCopyInto(out *SubnetClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SubnetClaimList) DeepCopyObject ¶
func (in *SubnetClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SubnetClaimPhase ¶
type SubnetClaimPhase string
SubnetClaimPhase defines the phase of a subnet claim
const ( // ClaimPending indicates the claim is waiting for allocation ClaimPending SubnetClaimPhase = "Pending" // ClaimBound indicates the claim has been successfully allocated ClaimBound SubnetClaimPhase = "Bound" // ClaimError indicates an error occurred during allocation ClaimError SubnetClaimPhase = "Error" )
type SubnetClaimSpec ¶
type SubnetClaimSpec struct { // PoolRef is the name of the SubnetPool to allocate from // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 PoolRef string `json:"poolRef"` // ClusterID is the unique identifier for the cluster // Used as the idempotency key for allocation // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:Pattern="^[a-z0-9.-]{1,63}$" ClusterID string `json:"clusterID"` // BlockSize is the desired prefix length for the allocated subnet // +kubebuilder:validation:Minimum=16 // +kubebuilder:validation:Maximum=28 // +optional BlockSize int `json:"blockSize,omitempty"` // RequestedCIDR is a specific CIDR that is being requested // If provided, the allocator will try to allocate this exact CIDR // +kubebuilder:validation:Format=cidr // +optional RequestedCIDR string `json:"requestedCIDR,omitempty"` }
SubnetClaimSpec defines the desired state of SubnetClaim +kubebuilder:validation:XValidation:rule="(has(self.blockSize) || has(self.requestedCIDR))",message="either blockSize or requestedCIDR must be set" +kubebuilder:validation:XValidation:rule="!(has(self.blockSize) && has(self.requestedCIDR))",message="blockSize and requestedCIDR are mutually exclusive"
func (*SubnetClaimSpec) DeepCopy ¶
func (in *SubnetClaimSpec) DeepCopy() *SubnetClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetClaimSpec.
func (*SubnetClaimSpec) DeepCopyInto ¶
func (in *SubnetClaimSpec) DeepCopyInto(out *SubnetClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubnetClaimStatus ¶
type SubnetClaimStatus struct { // ObservedGeneration はコントローラが最後に処理した世代を記録 // これにより、Spec変更のない状態更新では再処理を回避できる // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Phase indicates the current phase of the claim // +optional Phase SubnetClaimPhase `json:"phase,omitempty"` // AllocatedCIDR is the CIDR that was allocated for this claim // +optional AllocatedCIDR string `json:"allocatedCIDR,omitempty"` // Message provides additional information about the current phase // +optional Message string `json:"message,omitempty"` // Conditions represents the latest available observations of the claim's state // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
SubnetClaimStatus defines the observed state of SubnetClaim
func (*SubnetClaimStatus) DeepCopy ¶
func (in *SubnetClaimStatus) DeepCopy() *SubnetClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetClaimStatus.
func (*SubnetClaimStatus) DeepCopyInto ¶
func (in *SubnetClaimStatus) DeepCopyInto(out *SubnetClaimStatus)
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 SubnetPool ¶
type SubnetPool struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SubnetPoolSpec `json:"spec,omitempty"` Status SubnetPoolStatus `json:"status,omitempty"` }
SubnetPool is the Schema for the subnetpools API
func (*SubnetPool) DeepCopy ¶
func (in *SubnetPool) DeepCopy() *SubnetPool
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetPool.
func (*SubnetPool) DeepCopyInto ¶
func (in *SubnetPool) DeepCopyInto(out *SubnetPool)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SubnetPool) DeepCopyObject ¶
func (in *SubnetPool) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SubnetPoolClaim ¶
type SubnetPoolClaim struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SubnetPoolClaimSpec `json:"spec,omitempty"` Status SubnetPoolClaimStatus `json:"status,omitempty"` }
SubnetPoolClaim is the Schema for the subnetpoolclaims API
func (*SubnetPoolClaim) DeepCopy ¶
func (in *SubnetPoolClaim) DeepCopy() *SubnetPoolClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetPoolClaim.
func (*SubnetPoolClaim) DeepCopyInto ¶
func (in *SubnetPoolClaim) DeepCopyInto(out *SubnetPoolClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SubnetPoolClaim) DeepCopyObject ¶
func (in *SubnetPoolClaim) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SubnetPoolClaimList ¶
type SubnetPoolClaimList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SubnetPoolClaim `json:"items"` }
SubnetPoolClaimList contains a list of SubnetPoolClaim
func (*SubnetPoolClaimList) DeepCopy ¶
func (in *SubnetPoolClaimList) DeepCopy() *SubnetPoolClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetPoolClaimList.
func (*SubnetPoolClaimList) DeepCopyInto ¶
func (in *SubnetPoolClaimList) DeepCopyInto(out *SubnetPoolClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SubnetPoolClaimList) DeepCopyObject ¶
func (in *SubnetPoolClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SubnetPoolClaimPhase ¶
type SubnetPoolClaimPhase string
SubnetPoolClaimPhase defines the phase of a subnet pool claim
const ( // PoolClaimPending indicates the claim is waiting for allocation PoolClaimPending SubnetPoolClaimPhase = "Pending" // PoolClaimBound indicates the claim has been successfully bound to a pool PoolClaimBound SubnetPoolClaimPhase = "Bound" // PoolClaimError indicates an error occurred during allocation PoolClaimError SubnetPoolClaimPhase = "Error" )
type SubnetPoolClaimSpec ¶
type SubnetPoolClaimSpec struct { // ParentPoolRef is the name of the parent SubnetPool to allocate from // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 ParentPoolRef string `json:"parentPoolRef"` // DesiredBlockSize is the desired prefix length for the allocated subnet pool // +kubebuilder:validation:Minimum=16 // +kubebuilder:validation:Maximum=28 // +kubebuilder:validation:Required DesiredBlockSize int `json:"desiredBlockSize"` }
SubnetPoolClaimSpec defines the desired state of SubnetPoolClaim
func (*SubnetPoolClaimSpec) DeepCopy ¶
func (in *SubnetPoolClaimSpec) DeepCopy() *SubnetPoolClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetPoolClaimSpec.
func (*SubnetPoolClaimSpec) DeepCopyInto ¶
func (in *SubnetPoolClaimSpec) DeepCopyInto(out *SubnetPoolClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubnetPoolClaimStatus ¶
type SubnetPoolClaimStatus struct { // ObservedGeneration is the generation observed by the controller // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Phase indicates the current phase of the claim // +optional Phase SubnetPoolClaimPhase `json:"phase,omitempty"` // BoundPoolName is the name of the SubnetPool that was created for this claim // +optional BoundPoolName string `json:"boundPoolName,omitempty"` // Message provides additional information about the current phase // +optional Message string `json:"message,omitempty"` // Conditions represents the latest available observations of the claim's state // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
SubnetPoolClaimStatus defines the observed state of SubnetPoolClaim
func (*SubnetPoolClaimStatus) DeepCopy ¶
func (in *SubnetPoolClaimStatus) DeepCopy() *SubnetPoolClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetPoolClaimStatus.
func (*SubnetPoolClaimStatus) DeepCopyInto ¶
func (in *SubnetPoolClaimStatus) DeepCopyInto(out *SubnetPoolClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubnetPoolList ¶
type SubnetPoolList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SubnetPool `json:"items"` }
SubnetPoolList contains a list of SubnetPool
func (*SubnetPoolList) DeepCopy ¶
func (in *SubnetPoolList) DeepCopy() *SubnetPoolList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetPoolList.
func (*SubnetPoolList) DeepCopyInto ¶
func (in *SubnetPoolList) DeepCopyInto(out *SubnetPoolList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SubnetPoolList) DeepCopyObject ¶
func (in *SubnetPoolList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SubnetPoolSpec ¶
type SubnetPoolSpec struct { // CIDR is the overall CIDR range for this pool // +kubebuilder:validation:Required // +kubebuilder:validation:Format=cidr CIDR string `json:"cidr"` // DefaultBlockSize is the default prefix length to use when a SubnetClaim doesn't specify a blockSize // +kubebuilder:validation:Minimum=16 // +kubebuilder:validation:Maximum=28 // +kubebuilder:default=24 // +optional DefaultBlockSize int `json:"defaultBlockSize,omitempty"` // MinBlockSize is the minimum prefix length that can be requested from this pool // +kubebuilder:validation:Minimum=16 // +kubebuilder:validation:Maximum=28 // +optional MinBlockSize int `json:"minBlockSize,omitempty"` // MaxBlockSize is the maximum prefix length that can be requested from this pool // +kubebuilder:validation:Minimum=16 // +kubebuilder:validation:Maximum=28 // +optional MaxBlockSize int `json:"maxBlockSize,omitempty"` // Strategy defines the allocation strategy to use // +kubebuilder:default=Linear // +optional Strategy SubnetPoolStrategy `json:"strategy,omitempty"` }
SubnetPoolSpec defines the desired state of SubnetPool
func (*SubnetPoolSpec) DeepCopy ¶
func (in *SubnetPoolSpec) DeepCopy() *SubnetPoolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetPoolSpec.
func (*SubnetPoolSpec) DeepCopyInto ¶
func (in *SubnetPoolSpec) DeepCopyInto(out *SubnetPoolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubnetPoolStatus ¶
type SubnetPoolStatus struct { // ObservedGeneration はコントローラが最後に処理した世代を記録 // これにより、Spec変更のない状態更新では再計算を回避できる // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // AllocatedCount is the number of allocated subnet blocks // +optional AllocatedCount int `json:"allocatedCount,omitempty"` // FreeCountBySize is a map of prefix length to number of free blocks // +optional FreeCountBySize map[string]int `json:"freeCountBySize,omitempty"` // AllocatedCIDRs is a map of allocated CIDRs to cluster IDs // This serves as the source of truth for subnet allocation // +optional AllocatedCIDRs map[string]string `json:"allocatedCIDRs,omitempty"` // Conditions represents the latest available observations of the pool's state // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` }
SubnetPoolStatus defines the observed state of SubnetPool
func (*SubnetPoolStatus) DeepCopy ¶
func (in *SubnetPoolStatus) DeepCopy() *SubnetPoolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetPoolStatus.
func (*SubnetPoolStatus) DeepCopyInto ¶
func (in *SubnetPoolStatus) DeepCopyInto(out *SubnetPoolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SubnetPoolStrategy ¶
type SubnetPoolStrategy string
SubnetPoolStrategy defines the allocation strategy for the subnet pool +kubebuilder:validation:Enum=Linear;Buddy
const ( // StrategyLinear uses a linear first-fit allocation strategy StrategyLinear SubnetPoolStrategy = "Linear" // StrategyBuddy uses a buddy allocation strategy to minimize fragmentation StrategyBuddy SubnetPoolStrategy = "Buddy" )
type SubnetSpec ¶
type SubnetSpec struct { // PoolRef is the name of the SubnetPool this allocation belongs to // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 PoolRef string `json:"poolRef"` // CIDR is the allocated CIDR block // +kubebuilder:validation:Required // +kubebuilder:validation:Format=cidr CIDR string `json:"cidr"` // ClusterID is the unique identifier for the cluster // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:Pattern="^[a-z0-9.-]{1,63}$" ClusterID string `json:"clusterID"` // ClaimRef references the SubnetClaim that led to this allocation // +optional ClaimRef ClaimReference `json:"claimRef,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 { // Phase represents the current state of the Subnet // +optional Phase string `json:"phase,omitempty"` // AllocatedAt is the timestamp when the CIDR was successfully allocated // +optional AllocatedAt *metav1.Time `json:"allocatedAt,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.