v1alpha1

package
v0.20.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder initializes a scheme builder
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme is a global function that registers this API group & version to a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: scheduling.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

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

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.

func (*PodGroup) DeepCopy

func (in *PodGroup) DeepCopy() *PodGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroup.

func (*PodGroup) DeepCopyInto

func (in *PodGroup) DeepCopyInto(out *PodGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodGroup) DeepCopyObject

func (in *PodGroup) DeepCopyObject() runtime.Object

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 `spec.minMember` pods of PodGroups has been in running phase.
	PodGroupRunning PodGroupPhase = "Running"

	// PodGroupPreScheduling means all of pods has been are waiting to be scheduled, enqueue waitingPod
	PodGroupPreScheduling PodGroupPhase = "PreScheduling"

	// PodGroupScheduling means some of pods has been scheduling in running phase but have not reach the `spec.
	// minMember` pods of PodGroups.
	PodGroupScheduling PodGroupPhase = "Scheduling"

	// PodGroupScheduled means `spec.minMember` pods of PodGroups have been scheduled finished and pods have been in running
	// phase.
	PodGroupScheduled PodGroupPhase = "Scheduled"

	// 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"

	// PodGroupFinished means all of `spec.minMember` pods are successfully.
	PodGroupFinished PodGroupPhase = "Finished"

	// PodGroupFailed means at least one of `spec.minMember` pods is failed.
	PodGroupFailed PodGroupPhase = "Failed"
)

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 `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 anyone.
	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
	Scheduled int32 `json:"scheduled,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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL