Documentation
¶
Overview ¶
Package scheduling is the internal version of the API.
Index ¶
Constants ¶
const ( // PodFailedReason is probed if pod of PodGroup failed PodFailedReason string = "PodFailed" // PodDeletedReason is probed if pod of PodGroup deleted PodDeletedReason string = "PodDeleted" // NotEnoughResourcesReason is probed if there're not enough resources to schedule pods NotEnoughResourcesReason string = "NotEnoughResources" // NotEnoughPodsReason is probed if there're not enough tasks compared to `spec.minMember` NotEnoughPodsReason string = "NotEnoughTasks" )
const GroupName = "scheduling.volcano.sh"
GroupName is the group name used in this package.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is the group version used to register these objects.
Functions ¶
This section is empty.
Types ¶
type PodGroup ¶
type PodGroup struct {
metav1.TypeMeta
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
// +optional
metav1.ObjectMeta
// Specification of the desired behavior of the pod group.
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
// +optional
Spec PodGroupSpec
// Status represents the current information about a pod group.
// This data may not be up to date.
// +optional
Status PodGroupStatus
}
PodGroup is a collection of Pod; used for batch workload.
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 PodGroupCondition ¶
type PodGroupCondition struct {
// Type is the type of the condition
Type PodGroupConditionType
// Status is the status of the condition.
Status v1.ConditionStatus
// The ID of condition transition.
TransitionID string
// Last time the phase transitioned from another to current phase.
// +optional
LastTransitionTime metav1.Time
// Unique, one-word, CamelCase reason for the phase's last transition.
// +optional
Reason string
// Human-readable message indicating details about last transition.
// +optional
Message string
}
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
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 PodGroupConditionType ¶
type PodGroupConditionType string
const ( // PodGroupUnschedulableType is Unschedulable event type PodGroupUnschedulableType PodGroupConditionType = "Unschedulable" // PodGroupScheduled is scheduled event type PodGroupScheduled PodGroupConditionType = "Scheduled" )
type PodGroupList ¶
type PodGroupList struct {
metav1.TypeMeta
// Standard list metadata
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
// +optional
metav1.ListMeta
// items is the list of PodGroup
Items []PodGroup
}
PodGroupList is a collection of pod groups.
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 by the system, but scheduler can not allocate // enough resources to it. PodGroupPending PodGroupPhase = "Pending" // PodRunning means `spec.minMember` pods of PodGroups has been in running phase. PodGroupRunning PodGroupPhase = "Running" // PodGroupUnknown means part of `spec.minMember` pods are running but the other part can not // be scheduled, e.g. not enough resource; scheduler will wait for related controller to recover it. PodGroupUnknown PodGroupPhase = "Unknown" // PodGroupInqueue means controllers can start to create pods, // is a new state between PodGroupPending and PodGroupRunning PodGroupInqueue PodGroupPhase = "Inqueue" )
These are the valid phase of podGroups.
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
// Queue defines the queue to allocate resource for PodGroup; if queue does not exist,
// the PodGroup will not be scheduled.
Queue string
// If specified, indicates the PodGroup's priority. "system-node-critical" and
// "system-cluster-critical" are two special keywords which indicate the
// highest priorities with the former being the highest priority. Any other
// name must be defined by creating a PriorityClass object with that name.
// If not specified, the PodGroup priority will be default or zero if there is no
// default.
// +optional
PriorityClassName string
// MinResources defines the minimal resource of members/tasks to run the pod group;
// if there's not enough resources to start all tasks, the scheduler
// will not start anyone.
MinResources *v1.ResourceList
}
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
// The conditions of PodGroup.
// +optional
Conditions []PodGroupCondition
// The number of actively running pods.
// +optional
Running int32
// The number of pods which reached phase Succeeded.
// +optional
Succeeded int32
// The number of pods which reached phase Failed.
// +optional
Failed int32
}
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 Queue ¶
type Queue struct {
metav1.TypeMeta
// Standard object's metadata.
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
// +optional
metav1.ObjectMeta
// Specification of the desired behavior of the queue.
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
// +optional
Spec QueueSpec
// The status of queue.
// +optional
Status QueueStatus
}
Queue is a queue of PodGroup.
func (*Queue) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Queue.
func (*Queue) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Queue) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type QueueAction ¶
type QueueAction string
QueueAction is the action that queue controller will take according to the event.
const ( // SyncQueueAction is the action to sync queue status. SyncQueueAction QueueAction = "SyncQueue" // OpenQueueAction is the action to open queue OpenQueueAction QueueAction = "OpenQueue" // CloseQueueAction is the action to close queue CloseQueueAction QueueAction = "CloseQueue" )
type QueueEvent ¶
type QueueEvent string
QueueEvent represent the phase of queue.
const ( // QueueOutOfSyncEvent is triggered if PodGroup/Queue were updated QueueOutOfSyncEvent QueueEvent = "OutOfSync" // QueueCommandIssuedEvent is triggered if a command is raised by user QueueCommandIssuedEvent QueueEvent = "CommandIssued" )
type QueueList ¶
type QueueList struct {
metav1.TypeMeta
// Standard list metadata
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
// +optional
metav1.ListMeta
// items is the list of PodGroup
Items []Queue
}
QueueList is a collection of queues.
func (*QueueList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueList.
func (*QueueList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*QueueList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type QueueSpec ¶
type QueueSpec struct {
Weight int32
Capability v1.ResourceList
// Depreicated: replaced by status.State
State QueueState
// Reclaimable indicate whether the queue can be reclaimed by other queue
Reclaimable *bool
}
QueueSpec represents the template of Queue.
func (*QueueSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueSpec.
func (*QueueSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QueueState ¶
type QueueState string
QueueState is state type of queue.
const ( // QueueStateOpen indicate `Open` state of queue QueueStateOpen QueueState = "Open" // QueueStateClosed indicate `Closed` state of queue QueueStateClosed QueueState = "Closed" // QueueStateClosing indicate `Closing` state of queue QueueStateClosing QueueState = "Closing" // QueueStateUnknown indicate `Unknown` state of queue QueueStateUnknown QueueState = "Unknown" )
type QueueStatus ¶
type QueueStatus struct {
// State is status of queue
State QueueState
// The number of 'Unknown' PodGroup in this queue.
Unknown int32
// The number of 'Pending' PodGroup in this queue.
Pending int32
// The number of 'Running' PodGroup in this queue.
Running int32
// The number of `Inqueue` PodGroup in this queue.
Inqueue int32
}
QueueStatus represents the status of Queue.
func (*QueueStatus) DeepCopy ¶
func (in *QueueStatus) DeepCopy() *QueueStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueStatus.
func (*QueueStatus) DeepCopyInto ¶
func (in *QueueStatus) DeepCopyInto(out *QueueStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.