Documentation
¶
Overview ¶
+k8s:deepcopy-gen=package
Index ¶
Constants ¶
const ( // GroupName is the group name used in this package. GroupName = "scheduling.incubator.k8s.io" // GroupVersion is the version of scheduling group GroupVersion = "v1alpha1" )
const ( UnschedulableEvent Event = "Unschedulable" EvictEvent Event = "Evict" PodFailedEvent Event = "PodFailed" RestartAction Action = "restart" )
const GroupNameAnnotationKey = "scheduling.k8s.io/group-name"
GroupNameAnnotationKey is the annotation key of Pod to identify which PodGroup it belongs to.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
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 Action ¶
type Action string
Action is the action that PodGroup controller will take according to the event.
type LifeCyclePolicy ¶
type LifeCyclePolicy struct {
// The action that will be taken to the PodGroup according to Event.
// One of "Restart", "None".
// Default to None.
// +optional
Action Action
// The Event recorded by scheduler; the controller takes actions
// according to this Event.
// One of "PodFailed", "Unschedulable".
// +optional
Event Event
// Timeout is the grace period for controller to take actions.
// Default to nil (take action immediately).
// +optional
Timeout *metav1.Duration
}
LifecyclePolicy represents the lifecycle policy of PodGroup.
func (*LifeCyclePolicy) DeepCopy ¶
func (in *LifeCyclePolicy) DeepCopy() *LifeCyclePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LifeCyclePolicy.
func (*LifeCyclePolicy) DeepCopyInto ¶
func (in *LifeCyclePolicy) DeepCopyInto(out *LifeCyclePolicy)
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" 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 ¶
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
// 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 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"`
}
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 {
// 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,3,opt,name=succeeded"`
// The number of pods which reached phase Failed.
// +optional
Failed int32 `json:"failed,omitempty" protobuf:"bytes,3,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 pod group.
// 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"`
}
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 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 ¶
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 `json:"weight,omitempty" protobuf:"bytes,1,opt,name=weight"`
}
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.