Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the allocation v1alpha1 API group. +kubebuilder:object:generate=true +groupName=allocation.cybericebox.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeVersion is group version used to register these objects. SchemeGroupVersion = schema.GroupVersion{Group: "allocation.cybericebox.com", 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 )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group-qualified GroupResource
Types ¶
type Pool ¶
type Pool struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec PoolSpec `json:"spec,omitempty"`
Status PoolStatus `json:"status,omitempty"`
}
Pool is the Schema for the pools API.
func (*Pool) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pool.
func (*Pool) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Pool) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PoolLease ¶ added in v1.1.0
func (*PoolLease) DeepCopy ¶ added in v1.1.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolLease.
func (*PoolLease) DeepCopyInto ¶ added in v1.1.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PoolList ¶
type PoolList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Pool `json:"items"`
}
PoolList contains a list of Pool.
func (*PoolList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolList.
func (*PoolList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PoolList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PoolSpec ¶
type PoolSpec struct {
// Size is the total number of slots in this pool.
// +kubebuilder:validation:Minimum=1
Size uint `json:"size"`
// Offset shifts allocated indices: real value = Offset + bit_index.
// +kubebuilder:default=0
Offset uint `json:"offset,omitempty"`
}
PoolSpec defines the immutable configuration of a Pool.
func (*PoolSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolSpec.
func (*PoolSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PoolStatus ¶
type PoolStatus struct {
// Lease owners and bitmap change in the same resourceVersion CAS.
Leases map[string]PoolLease `json:"leases,omitempty"`
NextLeaseGeneration int64 `json:"nextLeaseGeneration,omitempty"`
// Free is the count of unallocated slots; mirrored to label pool.cybericebox.com/free.
Free uint `json:"free,omitempty"`
// BitMap is a base64-encoded bitset (one bit per slot, 1 = allocated).
BitMap string `json:"bitMap,omitempty"`
}
PoolStatus holds the mutable allocation state.
func (*PoolStatus) DeepCopy ¶
func (in *PoolStatus) DeepCopy() *PoolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolStatus.
func (*PoolStatus) DeepCopyInto ¶
func (in *PoolStatus) DeepCopyInto(out *PoolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.