Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the scheduling.x-k8s.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=scheduling.x-k8s.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( SchemeGroupVersion = schema.GroupVersion{Group: scheduling.GroupName, Version: "v1alpha1"} // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type ElasticQuota ¶
type ElasticQuota struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // ElasticQuotaSpec defines the Min and Max for Quota. // +optional Spec ElasticQuotaSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // ElasticQuotaStatus defines the observed use. // +optional Status ElasticQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
ElasticQuota sets elastic quota restrictions per namespace +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:resource:shortName={eq,eqs} +kubebuilder:subresource:status +kubebuilder:metadata:annotations="api-approved.kubernetes.io=https://github.com/kubernetes-sigs/scheduler-plugins/pull/52" +kubebuilder:printcolumn:name="Used",JSONPath=".status.used",type=string,description="Used is the current observed total usage of the resource in the namespace." +kubebuilder:printcolumn:name="Max",JSONPath=".spec.max",type=string,description="Max is the set of desired max limits for each named resource." +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type=date,description="Age is the time ElasticQuota was created."
func (*ElasticQuota) DeepCopy ¶
func (in *ElasticQuota) DeepCopy() *ElasticQuota
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticQuota.
func (*ElasticQuota) DeepCopyInto ¶
func (in *ElasticQuota) DeepCopyInto(out *ElasticQuota)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ElasticQuota) DeepCopyObject ¶
func (in *ElasticQuota) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ElasticQuotaList ¶
type ElasticQuotaList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of ElasticQuota objects. Items []ElasticQuota `json:"items" protobuf:"bytes,2,rep,name=items"` }
ElasticQuotaList is a list of ElasticQuota items.
func (*ElasticQuotaList) DeepCopy ¶
func (in *ElasticQuotaList) DeepCopy() *ElasticQuotaList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticQuotaList.
func (*ElasticQuotaList) DeepCopyInto ¶
func (in *ElasticQuotaList) DeepCopyInto(out *ElasticQuotaList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ElasticQuotaList) DeepCopyObject ¶
func (in *ElasticQuotaList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ElasticQuotaSpec ¶
type ElasticQuotaSpec struct { // Min is the set of desired guaranteed limits for each named resource. // +optional Min v1.ResourceList `json:"min,omitempty" protobuf:"bytes,1,rep,name=min, casttype=ResourceList,castkey=ResourceName"` // Max is the set of desired max limits for each named resource. The usage of max is based on the resource configurations of // successfully scheduled pods. // +optional Max v1.ResourceList `json:"max,omitempty" protobuf:"bytes,2,rep,name=max, casttype=ResourceList,castkey=ResourceName"` }
ElasticQuotaSpec defines the Min and Max for Quota.
func (*ElasticQuotaSpec) DeepCopy ¶
func (in *ElasticQuotaSpec) DeepCopy() *ElasticQuotaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticQuotaSpec.
func (*ElasticQuotaSpec) DeepCopyInto ¶
func (in *ElasticQuotaSpec) DeepCopyInto(out *ElasticQuotaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ElasticQuotaStatus ¶
type ElasticQuotaStatus struct { // Used is the current observed total usage of the resource in the namespace. // +optional Used v1.ResourceList `json:"used,omitempty" protobuf:"bytes,1,rep,name=used,casttype=ResourceList,castkey=ResourceName"` }
ElasticQuotaStatus defines the observed use.
func (*ElasticQuotaStatus) DeepCopy ¶
func (in *ElasticQuotaStatus) DeepCopy() *ElasticQuotaStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticQuotaStatus.
func (*ElasticQuotaStatus) DeepCopyInto ¶
func (in *ElasticQuotaStatus) DeepCopyInto(out *ElasticQuotaStatus)
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. // +optional metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the pod group. // +optional 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 is a collection of Pod; used for batch workload. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:resource:shortName={pg,pgs} +kubebuilder:subresource:status +kubebuilder:metadata:annotations="api-approved.kubernetes.io=https://github.com/kubernetes-sigs/scheduler-plugins/pull/50" +kubebuilder:printcolumn:name="Phase",JSONPath=".status.phase",type=string,description="Current phase of PodGroup." +kubebuilder:printcolumn:name="MinMember",JSONPath=".spec.minMember",type=integer,description="MinMember defines the minimal number of members/tasks to run the pod group." +kubebuilder:printcolumn:name="Running",JSONPath=".status.running",type=integer,description="The number of actively running pods." +kubebuilder:printcolumn:name="Succeeded",JSONPath=".status.succeeded",type=integer,description="The number of pods which reached phase Succeeded." +kubebuilder:printcolumn:name="Failed",JSONPath=".status.failed",type=integer,description="The number of pods which reached phase Failed." +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type=date,description="Age is the time PodGroup was created."
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 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.
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 ( // PodGroupPending means the pod group has been accepted by the system, but scheduler can not allocate // enough resources to it. PodGroupPending PodGroupPhase = "Pending" // PodGroupRunning means the `spec.minMember` pods of the pod group are in running phase. PodGroupRunning PodGroupPhase = "Running" // PodGroupScheduling means the number of pods scheduled is bigger than `spec.minMember` // but the number of running pods has not reached the `spec.minMember` pods of PodGroups. PodGroupScheduling PodGroupPhase = "Scheduling" // PodGroupUnknown means a part of `spec.minMember` pods of the pod group have been scheduled but the others can not // be scheduled due to, e.g. not enough resource; scheduler will wait for related controllers to recover them. PodGroupUnknown PodGroupPhase = "Unknown" // PodGroupFinished means the `spec.minMember` pods of the pod group are successfully finished. PodGroupFinished PodGroupPhase = "Finished" // PodGroupFailed means at least one of `spec.minMember` pods have failed. PodGroupFailed PodGroupPhase = "Failed" // PodGroupLabel is the default label of coscheduling PodGroupLabel = scheduling.GroupName + "/pod-group" )
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 any. // The minimum is 1 // +kubebuilder:validation:Minimum=1 MinMember int32 `json:"minMember,omitempty"` // 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 any. MinResources v1.ResourceList `json:"minResources,omitempty"` // ScheduleTimeoutSeconds defines the maximal time of members/tasks to wait before run the pod group; ScheduleTimeoutSeconds *int32 `json:"scheduleTimeoutSeconds,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"` // OccupiedBy marks the workload (e.g., deployment, statefulset) UID that occupy the podgroup. // It is empty if not initialized. OccupiedBy string `json:"occupiedBy,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 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.