Documentation ¶
Index ¶
Constants ¶
const ( // GroupName is the group name used in this package. GroupName = "resource.aibee.cn" // GroupVersion is the version of scheduling group GroupVersion = "v1alpha1" )
const GroupNameAnnotationKey = "resource.aibee.cn/pool"
GroupNameAnnotationKey is the annotation key of Pod to identify which ResourcePool it belongs to.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion}
SchemeGroupVersion is the group version used to register these objects.
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"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired resources divided // +optional Spec PoolSpec `json:"spec,omitempty"` // Status defines the actual enforced deserved resources and its current usage // +optional Status PoolStatus `json:"status,omitempty"` }
Pool
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 PoolList ¶
type PoolList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // +optional metav1.ListMeta `json:"metadata,omitempty"` // items is the list of Pool Items []Pool `json:"items"` }
Pool is a collection of resource pools.
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 { // NodeSelector match node label // +optional NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty"` // DisablePreemption flag whether task can preempt resources in the same pool , // if false, task in pool can preempt resources from other pools // if true, task cannot preempt resources from other pools and wait available // resource in self pool // +optional DisablePreemption bool `json:"disablePreemption,omitempty"` // DisableBorrowing flag whether task in self pool can borrow resources from other pool, // if false, task can borrow resources from other pool // if true, task will only can use deserved resources // +optional DisableBorrowing bool `json:"disableBorrowing,omitempty"` // BorrowingPools only borrow from those pools, // only available when DisableBorrowing is false, // if empty can borrow all sharing pools // +optional BorrowingPools []string `json:"borrowingPools,omitempty"` // DisableSharing flag if self pool share its resource to other pool, // if false, the pool can be preempted by task in other pool // if true, the pool will not be preempted. // +optional DisableSharing bool `json:"disableSharing,omitempty"` }
PoolSpec
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 { // Allocatable all quota of pool divided // +optional Deserved v1.ResourceList `json:"deserved,omitempty"` // Used is the current observed total usage of the resource by tasks in the Pool // +optional Used v1.ResourceList `json:"used,omitempty"` Shared v1.ResourceList `json:"borrowed,omitempty"` }
PoolStatus
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.