Documentation
¶
Overview ¶
Package v1alpha1 provides alpha API for Orchestration Scheduling API objects.
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type Affinity
- type CurrentOwners
- type Movement
- type MovementList
- type MovementSpec
- type MovementStatus
- type Owner
- type OwnerInfo
- type PodGroup
- type PodGroupAffinity
- type PodGroupAffinityTerm
- type PodGroupAntiAffinity
- type PodGroupCondition
- type PodGroupConditionDetail
- type PodGroupList
- type PodGroupPhase
- type PodGroupSpec
- type PodGroupStatus
- type RecommendedNode
- type Reservation
- type ReservationCondition
- type ReservationList
- type ReservationPhase
- type ReservationSpec
- type ReservationStatus
- type Scheduler
- type SchedulerAggregatedMetricsStatus
- type SchedulerList
- type SchedulerPhase
- type SchedulerSpec
- type SchedulerStatus
- type SortDimension
- type SortOrder
- type SortResource
- type SortRule
- type TaskInfo
- type Template
- type TemplateSpec
Constants ¶
const ( // GroupName is the group name used in this package GroupName string = "scheduling.godel.kubewharf.io" )
Variables ¶
var ( // SchemeBuilder collects schemas to build. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is used by generated client to add this scheme to the generated client. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is 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 Affinity ¶
type Affinity struct { // +optional PodGroupAffinity *PodGroupAffinity `json:"podGroupAffinity,omitempty"` // +optional PodGroupAntiAffinity *PodGroupAntiAffinity `json:"podGroupAntiAffinity,omitempty"` }
Affinity contains all the affinity and anti affinity rules
func (*Affinity) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Affinity.
func (*Affinity) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CurrentOwners ¶
type CurrentOwners struct { // Name is the name of owner pod. Name string `json:"name,omitempty"` // Namespace is the namespace of owner pod. Namespace string `json:"namespace,omitempty"` // UID is the uid of owner pod. UID types.UID `json:"uid,omitempty"` }
CurrentOwners indicate the owner pod information that occupy the Reservation. When Reservation is matched, currentOwners is metadata of matched pod.
func (*CurrentOwners) DeepCopy ¶
func (in *CurrentOwners) DeepCopy() *CurrentOwners
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CurrentOwners.
func (*CurrentOwners) DeepCopyInto ¶
func (in *CurrentOwners) DeepCopyInto(out *CurrentOwners)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Movement ¶
type Movement struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the behavior of a Movement. // +optional Spec MovementSpec `json:"spec,omitempty"` // Status describes the current status of a Movement. // This data may not be up to date. // +optional Status MovementStatus `json:"status,omitempty"` }
Movement stores necessary information for rescheduling decisions. It has a group of task movements which need to be performed in one attempt, movement creator, movement generation and so on. +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster +kubebuilder:object:root=true +kubebuilder:subresource:status
func (*Movement) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Movement.
func (*Movement) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Movement) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MovementList ¶
type MovementList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // +optional metav1.ListMeta `json:"metadata,omitempty"` // Items is the list of Movement Items []Movement `json:"items"` }
MovementList is a collection of movements. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status
func (*MovementList) DeepCopy ¶
func (in *MovementList) DeepCopy() *MovementList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MovementList.
func (*MovementList) DeepCopyInto ¶
func (in *MovementList) DeepCopyInto(out *MovementList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MovementList) DeepCopyObject ¶
func (in *MovementList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MovementSpec ¶
type MovementSpec struct { // A list of tasks need to be rescheduled // +optional DeletedTasks []*TaskInfo `json:"deletedTasks,omitempty"` // Creator of this movement. // +optional Creator string `json:"creator,omitempty"` // Generation of this movement. When a new round of rescheduling decisions are made, generation is bumped. // +optional Generation uint `json:"generation,omitempty"` }
MovementSpec describes the attributes that a Movement is created with.
func (*MovementSpec) DeepCopy ¶
func (in *MovementSpec) DeepCopy() *MovementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MovementSpec.
func (*MovementSpec) DeepCopyInto ¶
func (in *MovementSpec) DeepCopyInto(out *MovementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MovementStatus ¶
type MovementStatus struct { // A list of movement info for all owners // +optional Owners []*Owner `json:"owners,omitempty"` // Names of godel schedulers which have received this movement crd // +optional NotifiedSchedulers []string `json:"notifiedSchedulers,omitempty"` }
Current status of this movement.
func (*MovementStatus) DeepCopy ¶
func (in *MovementStatus) DeepCopy() *MovementStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MovementStatus.
func (*MovementStatus) DeepCopyInto ¶
func (in *MovementStatus) DeepCopyInto(out *MovementStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Owner ¶
type Owner struct { // Information of task owner Owner *OwnerInfo `json:"owner"` // Information of suggested nodes RecommendedNodes []*RecommendedNode `json:"recommendedNodes,omitempty"` // Tasks scheduled successfully but not use suggestion // +optional MismatchedTasks []*TaskInfo `json:"mismatchedTasks,omitempty"` }
Contain node suggestions for each owner
func (*Owner) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Owner.
func (*Owner) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OwnerInfo ¶
type OwnerInfo struct { // Owner type, e.g. ReplicaSet/StatefulSet... Type string `json:"type"` // Owner name Name string `json:"name"` // Owner namespace Namespace string `json:"namespace"` // Owner uid UID types.UID `json:"uid"` }
Information of task owner
func (*OwnerInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnerInfo.
func (*OwnerInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodGroup ¶
type PodGroup struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the pod group. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status Spec PodGroupSpec `json:"spec,omitempty"` // Status represents the current information about a pod group. // This data may not be up to date. // +optional Status PodGroupStatus `json:"status,omitempty"` }
PodGroup indicates a collection of Pods which will be used for batch workloads. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase",priority=1,description="The current status of the PodGroup" +kubebuilder:printcolumn:name="MinMember",type="integer",JSONPath=".spec.minMember",priority=1,description="The minimal number of members/tasks to run the PodGroup" +kubebuilder:printcolumn:name="TimeoutSeconds",type="integer",JSONPath=".spec.scheduleTimeoutSeconds",priority=1,description="The maximal time of tasks to wait before running the PodGroup" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*PodGroup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroup.
func (*PodGroup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodGroup) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodGroupAffinity ¶
type PodGroupAffinity struct { // Required represents a set of affinity terms, all of them MUST be satisfied // +optional Required []PodGroupAffinityTerm `json:"required,omitempty"` // Preferred represents a set of affinity terms that don't necessarily have to be satisfied. // But we need to try to satisfy // +optional Preferred []PodGroupAffinityTerm `json:"preferred,omitempty"` // SortRules indicates how the nodeGroups, aggregated by required or // preferred affinity, are sorted. The rule's index in slice is the sort // sequence. If this is not defined, we will sort nodeGroups in default sort rule. // +optional SortRules []SortRule `json:"sortRules,omitempty"` // NodeSelector specifies the requirements that must be met for the // podGroup's pods to fit on the nodes. // +optional NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty"` }
PodGroupAffinity defines the specific affinity rules
func (*PodGroupAffinity) DeepCopy ¶
func (in *PodGroupAffinity) DeepCopy() *PodGroupAffinity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupAffinity.
func (*PodGroupAffinity) DeepCopyInto ¶
func (in *PodGroupAffinity) DeepCopyInto(out *PodGroupAffinity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodGroupAffinityTerm ¶
type PodGroupAffinityTerm struct { // TopologyKey is the specific topology name that all related tasks should be scheduled to // Empty topologyKey is not allowed. TopologyKey string `json:"topologyKey,omitempty"` }
PodGroupAffinityTerm defines terms of pod group affinity
func (*PodGroupAffinityTerm) DeepCopy ¶
func (in *PodGroupAffinityTerm) DeepCopy() *PodGroupAffinityTerm
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupAffinityTerm.
func (*PodGroupAffinityTerm) DeepCopyInto ¶
func (in *PodGroupAffinityTerm) DeepCopyInto(out *PodGroupAffinityTerm)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodGroupAntiAffinity ¶
type PodGroupAntiAffinity struct { // Required represents a set of affinity terms, all of them MUST NOT be satisfied // +optional Required []PodGroupAffinityTerm `json:"required,omitempty"` // Preferred represents a set of affinity terms that we need to try not to satisfy them // +optional Preferred []PodGroupAffinityTerm `json:"preferred,omitempty"` }
PodGroupAntiAffinity defines the specific anti affinity rules
func (*PodGroupAntiAffinity) DeepCopy ¶
func (in *PodGroupAntiAffinity) DeepCopy() *PodGroupAntiAffinity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupAntiAffinity.
func (*PodGroupAntiAffinity) DeepCopyInto ¶
func (in *PodGroupAntiAffinity) DeepCopyInto(out *PodGroupAntiAffinity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodGroupCondition ¶
type PodGroupCondition struct { // Phase is the current phase of PodGroup Phase PodGroupPhase `json:"phase,omitempty"` // Status is the status of the condition. Status v1.ConditionStatus `json:"status,omitempty"` // Last time the phase transitioned from another to current phase. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // Unique, one-word, CamelCase reason for the phase's last transition. // +optional Reason string `json:"reason,omitempty"` // Human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty"` }
PodGroupCondition contains details for the current state of this pod group.
func (*PodGroupCondition) DeepCopy ¶
func (in *PodGroupCondition) DeepCopy() *PodGroupCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupCondition.
func (*PodGroupCondition) DeepCopyInto ¶
func (in *PodGroupCondition) DeepCopyInto(out *PodGroupCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodGroupConditionDetail ¶
type PodGroupConditionDetail string
Reserve for pod group controller to use
const ( // PodGroupReady is that PodGroup has reached scheduling restriction PodGroupReady PodGroupConditionDetail = "pod group is ready" // PodGroupNotReady is that PodGroup has not yet reached the scheduling restriction PodGroupNotReady PodGroupConditionDetail = "pod group is not ready" )
type PodGroupList ¶
type PodGroupList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // +optional metav1.ListMeta `json:"metadata,omitempty"` // Items is the list of PodGroup Items []PodGroup `json:"items"` }
PodGroupList is a collection of pod groups. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status
func (*PodGroupList) DeepCopy ¶
func (in *PodGroupList) DeepCopy() *PodGroupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupList.
func (*PodGroupList) DeepCopyInto ¶
func (in *PodGroupList) DeepCopyInto(out *PodGroupList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodGroupList) DeepCopyObject ¶
func (in *PodGroupList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodGroupPhase ¶
type PodGroupPhase string
PodGroupPhase is the phase of a pod group at the current time.
const ( // PodPending means the pod group has been accepted and less than `minMember` pods have been created. PodGroupPending PodGroupPhase = "Pending" // PodGroupPreScheduling means all of pods has been are waiting to be scheduled, but godel-scheduler // can not allocate enough resources to it. PodGroupPreScheduling PodGroupPhase = "PreScheduling" // PodGroupScheduled means `spec.minMember` pods of PodGroups have been scheduled. PodGroupScheduled PodGroupPhase = "Scheduled" // PodGroupRunning means `spec.minMember` pods of PodGroups has been in running phase. PodGroupRunning PodGroupPhase = "Running" // PodGroupTimeout means scheduler doesn't permit `spec.minMember` pod in given or default timeout period. PodGroupTimeout PodGroupPhase = "Timeout" // PodGroupFinished means all of `spec.minMember` pods runs successfully. PodGroupFinished PodGroupPhase = "Finished" // PodGroupFailed means at least one of `spec.minMember` pods is failed. PodGroupFailed PodGroupPhase = "Failed" // PodGroupUnknown is reserved for some known situation that pod group controller can not determine the status. PodGroupUnknown PodGroupPhase = "Unknown" )
type PodGroupSpec ¶
type PodGroupSpec struct { // MinMember defines the minimal number of members/tasks to run the pod group; // if there's not enough resources to start all tasks, the scheduler // will not start anyone. MinMember int32 `json:"minMember,omitempty"` // If specified, indicates the PodGroup's priority. "system-node-critical" and // "system-cluster-critical" are two special reserved keywords which indicate the highest priorities. // Any other name must be defined by creating a PriorityClass object with that name. // If not specified, the PodGroup priority will be default. // If default priority class doesn't exist, the PodGroup priority will be zero. // +optional PriorityClassName string `json:"priorityClassName,omitempty"` // ScheduleTimeoutSeconds defines the maximal time of tasks to wait before run the pod group; // +optional ScheduleTimeoutSeconds *int32 `json:"scheduleTimeoutSeconds,omitempty"` // Application indicates the podGroup belongs to a logical Application // This will be used for coordinate with features like drf and faire share. // +optional Application string `json:"application,omitempty"` // Affinity shows the affinity/anti-affinity rules that scheduler needs to follow // when scheduling instances of this pod group. // +optional Affinity *Affinity `json:"affinity,omitempty"` }
PodGroupSpec represents the template of a pod group.
func (*PodGroupSpec) DeepCopy ¶
func (in *PodGroupSpec) DeepCopy() *PodGroupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupSpec.
func (*PodGroupSpec) DeepCopyInto ¶
func (in *PodGroupSpec) DeepCopyInto(out *PodGroupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodGroupStatus ¶
type PodGroupStatus struct { // Current phase of PodGroup. Phase PodGroupPhase `json:"phase,omitempty"` // The conditions of PodGroup. // +optional Conditions []PodGroupCondition `json:"conditions,omitempty"` // OccupiedBy marks the workload (e.g., deployment, job) name that occupy the PodGroup. // It is empty if not initialized. OccupiedBy string `json:"occupiedBy,omitempty"` // The number of actively pending pods. // +optional Pending int32 `json:"pending,omitempty"` // The number of actively running pods. // +optional Running int32 `json:"running,omitempty"` // The number of pods which reached phase Succeeded. // +optional Succeeded int32 `json:"succeeded,omitempty"` // The number of pods which reached phase Failed. // +optional Failed int32 `json:"failed,omitempty"` // ScheduleStartTime of the pod group ScheduleStartTime *metav1.Time `json:"scheduleStartTime,omitempty"` }
PodGroupStatus represents the current state of a pod group.
func (*PodGroupStatus) DeepCopy ¶
func (in *PodGroupStatus) DeepCopy() *PodGroupStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupStatus.
func (*PodGroupStatus) DeepCopyInto ¶
func (in *PodGroupStatus) DeepCopyInto(out *PodGroupStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecommendedNode ¶
type RecommendedNode struct { // Node Name Node string `json:"node,omitempty"` // Desired pod count for this node DesiredPodCount int64 `json:"desiredPodCount,omitempty"` // Pods using this suggestion ActualPods []*TaskInfo `json:"actualPods,omitempty"` }
Contain desired state and actual state for node
func (*RecommendedNode) DeepCopy ¶
func (in *RecommendedNode) DeepCopy() *RecommendedNode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecommendedNode.
func (*RecommendedNode) DeepCopyInto ¶
func (in *RecommendedNode) DeepCopyInto(out *RecommendedNode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Reservation ¶
type Reservation struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired behavior of a Reservation. // +optional Spec ReservationSpec `json:"spec,omitempty"` // Status describes the current status of a Reservation. Status ReservationStatus `json:"status,omitempty"` }
Reservation details for a single Pod. It's also regarded as a basic scheduling unit (like a pod) in a certain scenario.
func (*Reservation) DeepCopy ¶
func (in *Reservation) DeepCopy() *Reservation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reservation.
func (*Reservation) DeepCopyInto ¶
func (in *Reservation) DeepCopyInto(out *Reservation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Reservation) DeepCopyObject ¶
func (in *Reservation) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReservationCondition ¶
type ReservationCondition struct { // Phase is the current phase of Reservation Phase ReservationPhase `json:"phase,omitempty"` // Status is the status of the condition. Status v1.ConditionStatus `json:"status,omitempty"` // Last time the phase transitioned from another to current phase. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // Unique, one-word, CamelCase reason for the phase's last transition. // +optional Reason string `json:"reason,omitempty"` // Human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty"` }
ReservationCondition contains details for the current state of this pod group.
func (*ReservationCondition) DeepCopy ¶
func (in *ReservationCondition) DeepCopy() *ReservationCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReservationCondition.
func (*ReservationCondition) DeepCopyInto ¶
func (in *ReservationCondition) DeepCopyInto(out *ReservationCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReservationList ¶
type ReservationList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // +optional metav1.ListMeta `json:"metadata,omitempty"` // Items is the list of Reservation Items []Reservation `json:"items"` }
ReservationList is a collection of ReservationLists. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status
func (*ReservationList) DeepCopy ¶
func (in *ReservationList) DeepCopy() *ReservationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReservationList.
func (*ReservationList) DeepCopyInto ¶
func (in *ReservationList) DeepCopyInto(out *ReservationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReservationList) DeepCopyObject ¶
func (in *ReservationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ReservationPhase ¶
type ReservationPhase string
ReservationPhase is the current phase of Reservation
const ( // ResourceReserved resources reserved, only specific pods can get resources from reservation。 ResourceReserved ReservationPhase = "Reserved" // ReservationMatched indicates that the pod has obtained reserved resources. // and reservation no longer takes up resources anymore. ReservationMatched ReservationPhase = "Matched" // PendingForReserve pending, waiting for scheduling, resource will be reserved. PendingForReserve ReservationPhase = "Pending" // ReservationTimeOut if reservation is timeout, reserved resources will be released. ReservationTimeOut ReservationPhase = "TimeOut" )
type ReservationSpec ¶
type ReservationSpec struct { // Template is the template of Reservation. Template Template `json:"template,omitempty"` // NodeName indicates the node name which has been reserved. NodeName string `json:"nodename,omitempty"` // TimeToLive indicates the reservation time to live. // When ttl is set, the reservation will be expired after ttl seconds. TimeToLive *int64 `json:"ttl,omitempty"` }
ReservationSpec defines the desired behavior of a Reservation.
func (*ReservationSpec) DeepCopy ¶
func (in *ReservationSpec) DeepCopy() *ReservationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReservationSpec.
func (*ReservationSpec) DeepCopyInto ¶
func (in *ReservationSpec) DeepCopyInto(out *ReservationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReservationStatus ¶
type ReservationStatus struct { // Phase is the current phase of Reservation Phase ReservationPhase `json:"phase,omitempty"` // The conditions of Reservation. // +optional Conditions []ReservationCondition `json:"conditions,omitempty"` // CurrentOwners marks the pod information that occupy the Reservation. CurrentOwners CurrentOwners `json:"currentOwners,omitempty"` }
ReservationStatus describes the current status of a Reservation.
func (*ReservationStatus) DeepCopy ¶
func (in *ReservationStatus) DeepCopy() *ReservationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReservationStatus.
func (*ReservationStatus) DeepCopyInto ¶
func (in *ReservationStatus) DeepCopyInto(out *ReservationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Scheduler ¶
type Scheduler struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the behavior of a Scheduler. // +optional Spec SchedulerSpec `json:"spec,omitempty"` // Status represents the current information about a Scheduler. This data may not be up // to date. // +optional Status SchedulerStatus `json:"status,omitempty"` }
Scheduler captures information about a scheduler Scheduler objects are non-namespaced.
func (*Scheduler) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scheduler.
func (*Scheduler) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Scheduler) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SchedulerAggregatedMetricsStatus ¶
type SchedulerAggregatedMetricsStatus struct { // pending pods in the pending queue // +optional PendingPods *int `json:"pendingPods,omitempty"` }
func (*SchedulerAggregatedMetricsStatus) DeepCopy ¶
func (in *SchedulerAggregatedMetricsStatus) DeepCopy() *SchedulerAggregatedMetricsStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerAggregatedMetricsStatus.
func (*SchedulerAggregatedMetricsStatus) DeepCopyInto ¶
func (in *SchedulerAggregatedMetricsStatus) DeepCopyInto(out *SchedulerAggregatedMetricsStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SchedulerList ¶
type SchedulerList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty"` // items is the list of Schedulers Items []Scheduler `json:"items"` }
SchedulerList is a collection of Scheduler objects.
func (*SchedulerList) DeepCopy ¶
func (in *SchedulerList) DeepCopy() *SchedulerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerList.
func (*SchedulerList) DeepCopyInto ¶
func (in *SchedulerList) DeepCopyInto(out *SchedulerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SchedulerList) DeepCopyObject ¶
func (in *SchedulerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SchedulerPhase ¶
type SchedulerPhase string
const ( Active SchedulerPhase = "Active" InActive SchedulerPhase = "InActive" )
type SchedulerSpec ¶
type SchedulerSpec struct { }
func (*SchedulerSpec) DeepCopy ¶
func (in *SchedulerSpec) DeepCopy() *SchedulerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerSpec.
func (*SchedulerSpec) DeepCopyInto ¶
func (in *SchedulerSpec) DeepCopyInto(out *SchedulerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SchedulerStatus ¶
type SchedulerStatus struct { // +optional Phase SchedulerPhase `json:"phase,omitempty"` // LastUpdateTime is the latest update time. // It should be first time initialized when this crd is created // +optional LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` // CurrentHost is the host the current scheduler leader runs on // +optional CurrentHost string `json:"currentHost,omitempty"` // TODO: populate more info here // TODO: investigate whether we need a separate API object for this // +optional MetricsStatus *SchedulerAggregatedMetricsStatus `json:"metricsStatus,omitempty"` // SchedulerNodePartitionName is the name of NodePartition which contains all the nodes in this scheduler's partition // +optional SchedulerNodePartitionName string `json:"schedulerNodePartitionName,omitempty"` }
func (*SchedulerStatus) DeepCopy ¶
func (in *SchedulerStatus) DeepCopy() *SchedulerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerStatus.
func (*SchedulerStatus) DeepCopyInto ¶
func (in *SchedulerStatus) DeepCopyInto(out *SchedulerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SortDimension ¶
type SortDimension string
const ( Capacity SortDimension = "Capacity" Available SortDimension = "Available" )
type SortResource ¶
type SortResource string
SortResource is the resource that items are sorted by.
const ( // GPUResource means items are sorted by GPU resource. GPUResource SortResource = "GPU" // CPUResource means items are sorted by CPU resource. CPUResource SortResource = "CPU" // MemoryResource means items are sorted by Memory Resource. MemoryResource SortResource = "Memory" )
type SortRule ¶
type SortRule struct { // Resource defines the resource name for sorting. Resource SortResource `json:"resource"` // Dimension may be Capacity or Available for the moment. // We allow this field to be empty for backward compatibility. Dimension SortDimension `json:"dimension,omitempty"` // Order may be either Ascending or Descending Order SortOrder `json:"order"` }
SortRule defines the rule for sorting items.
func (*SortRule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SortRule.
func (*SortRule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaskInfo ¶
type TaskInfo struct { // Task name, e.g. pod name Name string `json:"name"` // Task namespace, e.g. pod namespace Namespace string `json:"namespace"` // Task uid, e.g. pod uid UID types.UID `json:"uid"` // Node of this task Node string `json:"node"` }
Information of each task needs to be rescheduled
func (*TaskInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskInfo.
func (*TaskInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Template ¶
type Template struct { // Spec the specification of desired behavior of Reservation. Spec TemplateSpec `json:"spec,omitempty"` }
Template is the template of Reservation.
func (*Template) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.
func (*Template) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplateSpec ¶
type TemplateSpec struct { // SchedulerName indicates the scheduler name. SchedulerName string `json:"schedulerName,omitempty"` // Priority indicates the reservation schedule priority. Priority *int32 `json:"priority,omitempty"` // PriorityClassName indicates the priority class name. PriorityClassName string `json:"priorityClassName,omitempty"` // NodeSelector is a selector which must be true for the reservation to fit on a node. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // HostNetwork indicates whether the reservation is using host network. HostNetwork bool `json:"hostNetwork,omitempty"` // Affinity is a group of affinity scheduling rules. Affinity *v1.Affinity `json:"affinity,omitempty"` // Tolerations is a list of tolerations applied to reservation. Tolerations []*v1.Toleration `json:"tolerations,omitempty"` // InitContainers is a list of init containers belonging to the reservation. InitContainers []*v1.Container `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // Containers is a list of containers belonging to the reservation. Containers []*v1.Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name"` }
TemplateSpec reservation template indicates the reservation schedule requirement. It's a subset of PodSpec.
func (*TemplateSpec) DeepCopy ¶
func (in *TemplateSpec) DeepCopy() *TemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSpec.
func (*TemplateSpec) DeepCopyInto ¶
func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.