Documentation ¶
Overview ¶
Package v1alpha1 provides alpha API for Orchestration Scheduling API objects.
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type Affinity
- type PodGroup
- type PodGroupAffinity
- type PodGroupAffinityTerm
- type PodGroupAntiAffinity
- type PodGroupCondition
- type PodGroupConditionDetail
- type PodGroupList
- type PodGroupPhase
- type PodGroupSpec
- type PodGroupStatus
- type Scheduler
- type SchedulerAggregatedMetricsStatus
- type SchedulerList
- type SchedulerPhase
- type SchedulerSpec
- type SchedulerStatus
- type SortDimension
- type SortOrder
- type SortResource
- type SortRule
Constants ¶
const ( // GroupName is the group name used in this package GroupName string = "scheduling.escheduler.sh" )
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 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
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 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.