v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 4 Imported by: 39

Documentation

Overview

+k8s:deepcopy-gen=package

Index

Constants

View Source
const (
	// GroupName is the group name used in this package.
	GroupName = "scheduling.incubator.k8s.io"

	// GroupVersion is the version of scheduling group
	GroupVersion = "v1alpha1"
)
View Source
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"
)
View Source
const GroupNameAnnotationKey = "scheduling.k8s.io/group-name"

GroupNameAnnotationKey is the annotation key of Pod to identify which PodGroup it belongs to.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion}

SchemeGroupVersion is the 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 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" protobuf:"bytes,1,opt,name=metadata"`

	// 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 `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Status represents the current information about a pod group.
	// This data may not be up to date.
	// +optional
	Status PodGroupStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

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 PodGroupCondition added in v0.4.1

type PodGroupCondition struct {
	// Type is the type of the condition
	Type PodGroupConditionType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`

	// Status is the status of the condition.
	Status v1.ConditionStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"`

	// The ID of condition transition.
	TransitionID string `json:"transitionID,omitempty" protobuf:"bytes,3,opt,name=transitionID"`

	// Last time the phase transitioned from another to current phase.
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`

	// Unique, one-word, CamelCase reason for the phase's last transition.
	// +optional
	Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`

	// Human-readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}

PodGroupCondition contains details for the current state of this pod group.

func (*PodGroupCondition) DeepCopy added in v0.4.1

func (in *PodGroupCondition) DeepCopy() *PodGroupCondition

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

func (*PodGroupCondition) DeepCopyInto added in v0.4.1

func (in *PodGroupCondition) DeepCopyInto(out *PodGroupCondition)

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

type PodGroupConditionType added in v0.4.1

type PodGroupConditionType string
const (
	PodGroupUnschedulableType PodGroupConditionType = "Unschedulable"
)

type PodGroupList

type PodGroupList 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" protobuf:"bytes,1,opt,name=metadata"`

	// items is the list of PodGroup
	Items []PodGroup `json:"items" protobuf:"bytes,2,rep,name=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 added in v0.4.1

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

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" protobuf:"bytes,1,opt,name=minMember"`

	// Queue defines the queue to allocate resource for PodGroup; if queue does not exist,
	// the PodGroup will not be scheduled.
	Queue string `json:"queue,omitempty" protobuf:"bytes,2,opt,name=queue"`

	// 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 `json:"priorityClassName,omitempty" protobuf:"bytes,3,opt,name=priorityClassName"`
}

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" protobuf:"bytes,1,opt,name=phase"`

	// The conditions of PodGroup.
	// +optional
	Conditions []PodGroupCondition `json:"conditions,omitempty" protobuf:"bytes,2,opt,name=conditions"`

	// The number of actively running pods.
	// +optional
	Running int32 `json:"running,omitempty" protobuf:"bytes,3,opt,name=running"`

	// The number of pods which reached phase Succeeded.
	// +optional
	Succeeded int32 `json:"succeeded,omitempty" protobuf:"bytes,4,opt,name=succeeded"`

	// The number of pods which reached phase Failed.
	// +optional
	Failed int32 `json:"failed,omitempty" protobuf:"bytes,5,opt,name=failed"`
}

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 `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" protobuf:"bytes,1,opt,name=metadata"`

	// 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 `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// The status of queue.
	// +optional
	Status QueueStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

Queue is a queue of PodGroup.

func (*Queue) DeepCopy

func (in *Queue) DeepCopy() *Queue

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

func (*Queue) DeepCopyInto

func (in *Queue) DeepCopyInto(out *Queue)

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

func (*Queue) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type QueueList

type QueueList 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" protobuf:"bytes,1,opt,name=metadata"`

	// items is the list of PodGroup
	Items []Queue `json:"items" protobuf:"bytes,2,rep,name=items"`
}

QueueList is a collection of queues.

func (*QueueList) DeepCopy

func (in *QueueList) DeepCopy() *QueueList

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

func (*QueueList) DeepCopyInto

func (in *QueueList) DeepCopyInto(out *QueueList)

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

func (*QueueList) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type QueueSpec

type QueueSpec struct {
	Weight     int32           `json:"weight,omitempty" protobuf:"bytes,1,opt,name=weight"`
	Capability v1.ResourceList `json:"capability,omitempty" protobuf:"bytes,2,opt,name=capability"`
}

QueueSpec represents the template of Queue.

func (*QueueSpec) DeepCopy

func (in *QueueSpec) DeepCopy() *QueueSpec

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

func (*QueueSpec) DeepCopyInto

func (in *QueueSpec) DeepCopyInto(out *QueueSpec)

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

type QueueStatus added in v0.5.0

type QueueStatus struct {
	// The number of 'Unknonw' PodGroup in this queue.
	Unknown int32 `json:"unknown,omitempty" protobuf:"bytes,1,opt,name=unknown"`
	// The number of 'Pending' PodGroup in this queue.
	Pending int32 `json:"pending,omitempty" protobuf:"bytes,2,opt,name=pending"`
	// The number of 'Running' PodGroup in this queue.
	Running int32 `json:"running,omitempty" protobuf:"bytes,3,opt,name=running"`
}

QueueStatus represents the status of Queue.

func (*QueueStatus) DeepCopy added in v0.5.0

func (in *QueueStatus) DeepCopy() *QueueStatus

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

func (*QueueStatus) DeepCopyInto added in v0.5.0

func (in *QueueStatus) DeepCopyInto(out *QueueStatus)

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