v1alpha1

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package

Index

Constants

View Source
const GroupName = "arbitrator.incubator.k8s.io"

GroupName is the group name used in this package.

View Source
const QueueJobPlural = "queuejobs"
View Source
const SchedulingSpecPlural = "schedulingspecs"

SchedulingSpecPlural is the plural of SchedulingSpec

View Source
const XQueueJobPlural string = "xqueuejobs"

Variables

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

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 QueueJob

type QueueJob struct {
	metav1.TypeMeta `json:",inline"`

	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Specification of the desired behavior of a cron job, including the minAvailable
	Spec QueueJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Current status of QueueJob
	Status QueueJobStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*QueueJob) DeepCopy

func (in *QueueJob) DeepCopy() *QueueJob

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

func (*QueueJob) DeepCopyInto

func (in *QueueJob) DeepCopyInto(out *QueueJob)

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

func (*QueueJob) DeepCopyObject

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

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

type QueueJobList

type QueueJobList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Items []QueueJob `json:"items" protobuf:"bytes,2,rep,name=items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*QueueJobList) DeepCopy

func (in *QueueJobList) DeepCopy() *QueueJobList

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

func (*QueueJobList) DeepCopyInto

func (in *QueueJobList) DeepCopyInto(out *QueueJobList)

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

func (*QueueJobList) DeepCopyObject

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

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

type QueueJobSpec

type QueueJobSpec struct {
	SchedulerName string `json:"schedulerName,omitempty" protobuf:"bytes,1,opt,name=schedulerName"`

	// SchedSpec specifies the parameters for scheduling.
	SchedSpec SchedulingSpecTemplate `json:"schedulingSpec,omitempty" protobuf:"bytes,2,opt,name=schedulingSpec"`

	// TaskSpecs specifies the task specification of QueueJob
	TaskSpecs []TaskSpec `json:"taskSpecs,omitempty" protobuf:"bytes,3,opt,name=taskSpecs"`
}

QueueJobSpec describes how the job execution will look like and when it will actually run

func (*QueueJobSpec) DeepCopy

func (in *QueueJobSpec) DeepCopy() *QueueJobSpec

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

func (*QueueJobSpec) DeepCopyInto

func (in *QueueJobSpec) DeepCopyInto(out *QueueJobSpec)

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

type QueueJobStatus

type QueueJobStatus struct {
	// The number of pending pods.
	// +optional
	Pending int32 `json:"pending,omitempty" protobuf:"bytes,1,opt,name=pending"`

	// The number of running pods.
	// +optional
	Running int32 `json:"running,omitempty" protobuf:"bytes,2,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,4,opt,name=failed"`

	// The minimal available pods to run for this QueueJob
	// +optional
	MinAvailable int32 `json:"minAvailable,omitempty" protobuf:"bytes,5,opt,name=minAvailable"`
}

QueueJobStatus represents the current state of a QueueJob

func (*QueueJobStatus) DeepCopy

func (in *QueueJobStatus) DeepCopy() *QueueJobStatus

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

func (*QueueJobStatus) DeepCopyInto

func (in *QueueJobStatus) DeepCopyInto(out *QueueJobStatus)

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

type ResourceName

type ResourceName string

type ResourceType

type ResourceType string

queue job resources type

const (
	ResourceTypePod         ResourceType = "Pod"
	ResourceTypeService     ResourceType = "Service"
	ResourceTypeSecret      ResourceType = "Secret"
	ResourceTypeStatefulSet ResourceType = "StatefulSet"
	ResourceTypeDeployment  ResourceType = "Deployment"
	ResourceTypeReplicaSet  ResourceType = "ReplicaSet"
)

type SchedulingSpec

type SchedulingSpec struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec SchedulingSpecTemplate `json:"spec,omitempty" protobuf:"bytes,1,rep,name=spec"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SchedulingSpec) DeepCopy

func (in *SchedulingSpec) DeepCopy() *SchedulingSpec

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

func (*SchedulingSpec) DeepCopyInto

func (in *SchedulingSpec) DeepCopyInto(out *SchedulingSpec)

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

func (*SchedulingSpec) DeepCopyObject

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

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

type SchedulingSpecList

type SchedulingSpecList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []SchedulingSpec `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SchedulingSpecList) DeepCopy

func (in *SchedulingSpecList) DeepCopy() *SchedulingSpecList

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

func (*SchedulingSpecList) DeepCopyInto

func (in *SchedulingSpecList) DeepCopyInto(out *SchedulingSpecList)

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

func (*SchedulingSpecList) DeepCopyObject

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

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

type SchedulingSpecTemplate

type SchedulingSpecTemplate struct {
	NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,1,rep,name=nodeSelector"`
	MinAvailable int               `json:"minAvailable,omitempty" protobuf:"bytes,2,rep,name=minAvailable"`
}

func (*SchedulingSpecTemplate) DeepCopy

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

func (*SchedulingSpecTemplate) DeepCopyInto

func (in *SchedulingSpecTemplate) DeepCopyInto(out *SchedulingSpecTemplate)

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

type TaskSpec

type TaskSpec struct {
	// A label query over pods that should match the pod count.
	// Normally, the system sets this field for you.
	// +optional
	Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`

	// Replicas specifies the replicas of this TaskSpec in QueueJob.
	Replicas int32 `json:"replicas,omitempty" protobuf:"bytes,2,opt,name=replicas"`

	// Specifies the pod that will be created for this TaskSpec
	// when executing a QueueJob
	Template v1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"`
}

TaskSpec specifies the task specification of QueueJob

func (*TaskSpec) DeepCopy

func (in *TaskSpec) DeepCopy() *TaskSpec

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

func (*TaskSpec) DeepCopyInto

func (in *TaskSpec) DeepCopyInto(out *TaskSpec)

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

type XQueueJob

type XQueueJob struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              XQueueJobSpec   `json:"spec"`
	Status            XQueueJobStatus `json:"status,omitempty"`
}

Definition of QueueJob class +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*XQueueJob) DeepCopy

func (in *XQueueJob) DeepCopy() *XQueueJob

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

func (*XQueueJob) DeepCopyInto

func (in *XQueueJob) DeepCopyInto(out *XQueueJob)

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

func (*XQueueJob) DeepCopyObject

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

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

type XQueueJobList

type XQueueJobList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []XQueueJob `json:"items"`
}

QueueJobList is a collection of queuejobs. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*XQueueJobList) DeepCopy

func (in *XQueueJobList) DeepCopy() *XQueueJobList

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

func (*XQueueJobList) DeepCopyInto

func (in *XQueueJobList) DeepCopyInto(out *XQueueJobList)

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

func (*XQueueJobList) DeepCopyObject

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

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

type XQueueJobResource

type XQueueJobResource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	// Replicas is the number of desired replicas
	Replicas int32 `json:"replicas,omitempty" protobuf:"bytes,2,opt,name=replicas"`

	// The minimal available pods to run for this QueueJob; the default value is nil
	MinAvailable *int32 `json:"minavailable,omitempty" protobuf:"bytes,3,opt,name=minavailable"`

	// The number of allocated replicas from this resource type
	AllocatedReplicas int32 `json:"allocatedreplicas"`

	// The priority of this resource
	Priority float64 `json:"priority"`

	//The type of the resource (is the resource a Pod, a ReplicaSet, a ... ?)
	Type ResourceType `json:"type"`

	//The template for the resource; it is now a raw text because we don't know for what resource
	//it should be instantiated
	Template runtime.RawExtension `json:"template"`
}

QueueJobResource is queue job aggregation resource

func (*XQueueJobResource) DeepCopy

func (in *XQueueJobResource) DeepCopy() *XQueueJobResource

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

func (*XQueueJobResource) DeepCopyInto

func (in *XQueueJobResource) DeepCopyInto(out *XQueueJobResource)

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

type XQueueJobResourceList

type XQueueJobResourceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []XQueueJobResource
}

a collection of QueueJobResource

func (*XQueueJobResourceList) DeepCopy

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

func (*XQueueJobResourceList) DeepCopyInto

func (in *XQueueJobResourceList) DeepCopyInto(out *XQueueJobResourceList)

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

type XQueueJobService

type XQueueJobService struct {
	Spec v1.ServiceSpec `json:"spec"`
}

QueueJobService is queue job service definition

func (*XQueueJobService) DeepCopy

func (in *XQueueJobService) DeepCopy() *XQueueJobService

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

func (*XQueueJobService) DeepCopyInto

func (in *XQueueJobService) DeepCopyInto(out *XQueueJobService)

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

type XQueueJobSpec

type XQueueJobSpec struct {
	Priority      int                   `json:"priority,omitempty"`
	Service       XQueueJobService      `json:"service"`
	AggrResources XQueueJobResourceList `json:"resources"`

	Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,1,opt,name=selector"`

	// SchedSpec specifies the parameters for scheduling.
	SchedSpec SchedulingSpecTemplate `json:"schedulingSpec,omitempty" protobuf:"bytes,2,opt,name=schedulingSpec"`
}

JobSpec describes how the queue job will look like.

func (*XQueueJobSpec) DeepCopy

func (in *XQueueJobSpec) DeepCopy() *XQueueJobSpec

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

func (*XQueueJobSpec) DeepCopyInto

func (in *XQueueJobSpec) DeepCopyInto(out *XQueueJobSpec)

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

type XQueueJobState

type XQueueJobState string
const (
	QueueJobStateEnqueued XQueueJobState = "Pending"
	QueueJobStateActive   XQueueJobState = "Running"
	QueueJobStateDeleted  XQueueJobState = "Deleted"
	QueueJobStateFailed   XQueueJobState = "Failed"
)

enqueued, active, deleting, succeeded, failed

type XQueueJobStatus

type XQueueJobStatus struct {
	// The number of pending pods.
	// +optional
	Pending int32 `json:"pending,omitempty" protobuf:"bytes,1,opt,name=pending"`

	// +optional
	Running int32 `json:"running,omitempty" protobuf:"bytes,1,opt,name=running"`

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

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

	// The minimal available resources to run for this QueueJob (is this different from the MinAvailable from JobStatus)
	// +optional
	MinAvailable int32 `json:"template,omitempty" protobuf:"bytes,4,opt,name=template"`

	//Can run?
	CanRun bool `json:"canrun,omitempty" protobuf:"bytes,1,opt,name=canrun"`

	//State - Running, Queued, Deleted ?
	State XQueueJobState `json:"state,omitempty"`

	Message string `json:"message,omitempty"`
}

QueueJobStatus represents the current state of a QueueJob

func (*XQueueJobStatus) DeepCopy

func (in *XQueueJobStatus) DeepCopy() *XQueueJobStatus

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

func (*XQueueJobStatus) DeepCopyInto

func (in *XQueueJobStatus) DeepCopyInto(out *XQueueJobStatus)

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