v1alpha2

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha2 contains API Schema definitions for the kueue v1alpha2 API group +kubebuilder:object:generate=true +groupName=kueue.x-k8s.io

Index

Constants

View Source
const (
	ResourceInUseFinalizerName = "kueue.k8s.io/resource-in-use"

	DefaultPodSetName = "main"
)
View Source
const (
	// WorkloadAdmitted means that the Workload was admitted by a ClusterQueue.
	WorkloadAdmitted = "Admitted"

	// WorkloadFinished means that the workload associated to the
	// ResourceClaim finished running (failed or succeeded).
	WorkloadFinished = "Finished"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kueue.x-k8s.io", Version: "v1alpha2"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Admission

type Admission struct {
	// clusterQueue is the name of the ClusterQueue that admitted this workload.
	ClusterQueue ClusterQueueReference `json:"clusterQueue"`

	// podSetFlavors hold the admission results for each of the .spec.podSets entries.
	// +listType=map
	// +listMapKey=name
	PodSetFlavors []PodSetFlavors `json:"podSetFlavors"`
}

func (*Admission) DeepCopy

func (in *Admission) DeepCopy() *Admission

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

func (*Admission) DeepCopyInto

func (in *Admission) DeepCopyInto(out *Admission)

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

type ClusterQueue

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

	Spec   ClusterQueueSpec   `json:"spec,omitempty"`
	Status ClusterQueueStatus `json:"status,omitempty"`
}

ClusterQueue is the Schema for the clusterQueue API.

func (*ClusterQueue) DeepCopy

func (in *ClusterQueue) DeepCopy() *ClusterQueue

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

func (*ClusterQueue) DeepCopyInto

func (in *ClusterQueue) DeepCopyInto(out *ClusterQueue)

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

func (*ClusterQueue) DeepCopyObject

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

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

type ClusterQueueList

type ClusterQueueList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterQueue `json:"items"`
}

ClusterQueueList contains a list of ClusterQueue

func (*ClusterQueueList) DeepCopy

func (in *ClusterQueueList) DeepCopy() *ClusterQueueList

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

func (*ClusterQueueList) DeepCopyInto

func (in *ClusterQueueList) DeepCopyInto(out *ClusterQueueList)

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

func (*ClusterQueueList) DeepCopyObject

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

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

type ClusterQueueReference

type ClusterQueueReference string

ClusterQueueReference is the name of the ClusterQueue.

type ClusterQueueSpec

type ClusterQueueSpec struct {
	// resources represent the total pod requests of workloads dispatched
	// via this clusterQueue. This doesn’t guarantee the actual availability of
	// resources, although an integration with a resource provisioner like Cluster
	// Autoscaler is possible to achieve that. Example:
	//
	// - name: cpu
	//   flavors:
	//   - quota:
	//       min: 100
	// - name: memory
	//   flavors:
	//   - quota:
	//       min: 100Gi
	//
	// Two resources must either have all the flavors in the same order or not
	// have any matching flavors. When two resources match their flavors, they
	// are said to be codependent. When a workload is admitted by this
	// ClusterQueue, all the codependent resources that the Workload requests get
	// assigned the same flavor.
	//
	// resources can be up to 16 elements.
	//
	// +listType=map
	// +listMapKey=name
	Resources []Resource `json:"resources,omitempty"`

	// cohort that this ClusterQueue belongs to. QCs that belong to the
	// same cohort can borrow unused resources from each other.
	//
	// A QC can be a member of a single borrowing cohort. A workload submitted
	// to a queue referencing this QC can borrow resources from any QC in the
	// cohort. Only resources listed in the QC can be borrowed (see example).
	//
	// In the example below, the following applies:
	// 1. tenantB can run a workload consuming up to 20 k80 GPUs, meaning a resource
	//    can be allocated from more than one clusterQueue in a cohort.
	// 2. tenantB can not consume any p100 GPUs or spot because its QC has no quota
	//    defined for them, and so the max is implicitly 0.
	// 3. If both tenantA and tenantB are running jobs such that current usage for
	//    tenantA is lower than its min quota (e.g., 5 k80 GPUS) while
	//    tenantB’s usage is higher than its min quota (e.g., 12 k80 GPUs),
	//    and both tenants have pending jobs requesting the remaining clusterQueue of
	//    the cohort (the 3 k80 GPUs), then tenantA jobs will get this remaining
	//    clusterQueue since tenantA is below its min limit.
	// 4. If a tenantA workload doesn’t tolerate spot, then the workload will only
	//    be eligible to consume on-demand cores (the next in the list of cpu flavors).
	// 5. Before considering on-demand, the workload will get assigned spot if
	//    the quota can be borrowed from the cohort.
	//
	// metadata:
	//  name: tenantA
	// spec:
	//  cohort: borrowing-cohort
	//  resources:
	// - name: cpu
	//   - name: spot
	//     quota:
	//       min: 1000
	//   - name: on-demand
	//     quota:
	//       min: 100
	// - name: nvidia.com/gpus
	//   - name: k80
	//     quota:
	//       min: 10
	//       max: 20
	//     labels:
	//     - cloud.provider.com/accelerator: nvidia-tesla-k80
	//   - name: p100
	//     quota:
	//       min: 10
	//       max: 20
	//     labels:
	//     - cloud.provider.com/accelerator: nvidia-tesla-p100
	//
	// metadata:
	//  name: tenantB
	// spec:
	//  cohort: borrowing-cohort
	//  resources:
	// - name: cpu
	//   - name: on-demand
	//     quota:
	//       min: 100
	// - name: nvidia.com/gpus
	//   - name: k80
	//     quota:
	//       min: 10
	//       max: 20
	//     labels:
	//     - cloud.provider.com/accelerator: nvidia-tesla-k80
	//
	// If empty, this ClusterQueue cannot borrow from any other ClusterQueue and vice versa.
	//
	// The name style is similar to label keys. These are just names to link QCs
	// together, and they are meaningless otherwise.
	Cohort string `json:"cohort,omitempty"`

	// QueueingStrategy indicates the queueing strategy of the workloads
	// across the queues in this ClusterQueue. This field is immutable.
	// Current Supported Strategies:
	//
	// - StrictFIFO: workloads are ordered strictly by creation time.
	// Older workloads that can't be admitted will block admitting newer
	// workloads even if they fit available quota.
	// - BestEffortFIFO:workloads are ordered by creation time,
	// however older workloads that can't be admitted will not block
	// admitting newer workloads that fit existing quota.
	//
	// +kubebuilder:default=BestEffortFIFO
	// +kubebuilder:validation:Enum=StrictFIFO;BestEffortFIFO
	QueueingStrategy QueueingStrategy `json:"queueingStrategy,omitempty"`

	// namespaceSelector defines which namespaces are allowed to submit workloads to
	// this clusterQueue. Beyond this basic support for policy, an policy agent like
	// Gatekeeper should be used to enforce more advanced policies.
	// Defaults to null which is a nothing selector (no namespaces eligible).
	// If set to an empty selector `{}`, then all namespaces are eligible.
	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
}

ClusterQueueSpec defines the desired state of ClusterQueue

func (*ClusterQueueSpec) DeepCopy

func (in *ClusterQueueSpec) DeepCopy() *ClusterQueueSpec

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

func (*ClusterQueueSpec) DeepCopyInto

func (in *ClusterQueueSpec) DeepCopyInto(out *ClusterQueueSpec)

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

type ClusterQueueStatus

type ClusterQueueStatus struct {
	// usedResources are the resources (by flavor) currently in use by the
	// workloads assigned to this clusterQueue.
	// +optional
	UsedResources UsedResources `json:"usedResources"`

	// PendingWorkloads is the number of workloads currently waiting to be
	// admitted to this clusterQueue.
	// +optional
	PendingWorkloads int32 `json:"pendingWorkloads"`

	// AdmittedWorkloads is the number of workloads currently admitted to this
	// clusterQueue and haven't finished yet.
	// +optional
	AdmittedWorkloads int32 `json:"admittedWorkloads"`
}

ClusterQueueStatus defines the observed state of ClusterQueue

func (*ClusterQueueStatus) DeepCopy

func (in *ClusterQueueStatus) DeepCopy() *ClusterQueueStatus

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

func (*ClusterQueueStatus) DeepCopyInto

func (in *ClusterQueueStatus) DeepCopyInto(out *ClusterQueueStatus)

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

type Flavor

type Flavor struct {
	// name is a reference to the resourceFlavor that defines this flavor.
	// +kubebuilder:default=default
	Name ResourceFlavorReference `json:"name"`

	// quota is the limit of resource usage at a point in time.
	Quota Quota `json:"quota"`
}

func (*Flavor) DeepCopy

func (in *Flavor) DeepCopy() *Flavor

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

func (*Flavor) DeepCopyInto

func (in *Flavor) DeepCopyInto(out *Flavor)

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

type LocalQueue

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

	Spec   LocalQueueSpec   `json:"spec,omitempty"`
	Status LocalQueueStatus `json:"status,omitempty"`
}

LocalQueue is the Schema for the localQueues API

func (*LocalQueue) DeepCopy

func (in *LocalQueue) DeepCopy() *LocalQueue

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

func (*LocalQueue) DeepCopyInto

func (in *LocalQueue) DeepCopyInto(out *LocalQueue)

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

func (*LocalQueue) DeepCopyObject

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

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

type LocalQueueList

type LocalQueueList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []LocalQueue `json:"items"`
}

LocalQueueList contains a list of LocalQueue

func (*LocalQueueList) DeepCopy

func (in *LocalQueueList) DeepCopy() *LocalQueueList

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

func (*LocalQueueList) DeepCopyInto

func (in *LocalQueueList) DeepCopyInto(out *LocalQueueList)

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

func (*LocalQueueList) DeepCopyObject

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

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

type LocalQueueSpec

type LocalQueueSpec struct {
	// clusterQueue is a reference to a clusterQueue that backs this localQueue.
	ClusterQueue ClusterQueueReference `json:"clusterQueue,omitempty"`
}

LocalQueueSpec defines the desired state of LocalQueue

func (*LocalQueueSpec) DeepCopy

func (in *LocalQueueSpec) DeepCopy() *LocalQueueSpec

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

func (*LocalQueueSpec) DeepCopyInto

func (in *LocalQueueSpec) DeepCopyInto(out *LocalQueueSpec)

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

type LocalQueueStatus

type LocalQueueStatus struct {
	// PendingWorkloads is the number of workloads currently admitted to this
	// localQueue not yet admitted to a ClusterQueue.
	// +optional
	PendingWorkloads int32 `json:"pendingWorkloads"`
}

LocalQueueStatus defines the observed state of LocalQueue

func (*LocalQueueStatus) DeepCopy

func (in *LocalQueueStatus) DeepCopy() *LocalQueueStatus

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

func (*LocalQueueStatus) DeepCopyInto

func (in *LocalQueueStatus) DeepCopyInto(out *LocalQueueStatus)

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

type PodSet

type PodSet struct {
	// name is the PodSet name.
	// +kubebuilder:default=main
	Name string `json:"name"`

	// spec is the Pod spec.
	// If requests are omitted for a container or initContainer,
	// they default to the limits if they are explicitly specified for the
	// container or initcontainer.
	Spec corev1.PodSpec `json:"spec"`

	// count is the number of pods for the spec.
	Count int32 `json:"count"`
}

func (*PodSet) DeepCopy

func (in *PodSet) DeepCopy() *PodSet

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

func (*PodSet) DeepCopyInto

func (in *PodSet) DeepCopyInto(out *PodSet)

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

type PodSetFlavors

type PodSetFlavors struct {
	// Name is the name of the podSet. It should match one of the names in .spec.podSets.
	// +kubebuilder:default=main
	Name string `json:"name"`

	// Flavors are the flavors assigned to the workload for each resource.
	Flavors map[corev1.ResourceName]string `json:"flavors,omitempty"`
}

func (*PodSetFlavors) DeepCopy

func (in *PodSetFlavors) DeepCopy() *PodSetFlavors

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

func (*PodSetFlavors) DeepCopyInto

func (in *PodSetFlavors) DeepCopyInto(out *PodSetFlavors)

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

type QueueingStrategy

type QueueingStrategy string
const (
	// StrictFIFO means that workloads are ordered strictly by creation time.
	// Older workloads that can't be admitted will block admitting newer
	// workloads even if they fit available quota.
	StrictFIFO QueueingStrategy = "StrictFIFO"

	// BestEffortFIFO means that workloads are ordered by creation time,
	// however older workloads that can't be admitted will not block
	// admitting newer workloads that fit existing quota.
	BestEffortFIFO QueueingStrategy = "BestEffortFIFO"
)

type Quota

type Quota struct {
	// min quantity of resource requests that are available to be used by workloads
	// admitted by this ClusterQueue at a point in time.
	// The quantity must be positive.
	// The sum of min quotas for a flavor in a cohort defines the maximum amount
	// of resources that can be allocated by a ClusterQueue in the cohort.
	Min resource.Quantity `json:"min,omitempty"`

	// max is the upper limit on the quantity of resource requests that
	// can be used by workloads admitted by this ClusterQueue at a point in time.
	// Resources can be borrowed from unused min quota of other
	// ClusterQueues in the same cohort.
	// If not null, it must be greater than or equal to min.
	// If null, there is no upper limit for borrowing.
	Max *resource.Quantity `json:"max,omitempty"`
}

func (*Quota) DeepCopy

func (in *Quota) DeepCopy() *Quota

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

func (*Quota) DeepCopyInto

func (in *Quota) DeepCopyInto(out *Quota)

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

type Resource

type Resource struct {
	// name of the resource. For example, cpu, memory or nvidia.com/gpu.
	Name corev1.ResourceName `json:"name"`

	// flavors is the list of different flavors of this resource and their limits.
	// Typically two different “flavors” of the same resource represent
	// different hardware models (e.g., gpu models, cpu architectures) or
	// pricing (on-demand vs spot cpus). The flavors are distinguished via labels and
	// taints.
	//
	// For example, if the resource is nvidia.com/gpu, and we want to define
	// different limits for different gpu models, then each model is mapped to a
	// flavor and must set different values of a shared key. For example:
	//
	// spec:
	//  resources:
	// - name: nvidia.com/gpus
	//   - name: k80
	//     quota:
	//       min: 10
	//   - name: p100
	//     quota:
	//       min: 10
	//
	// The flavors are evaluated in order, selecting the first to satisfy a
	// workload’s requirements. Also the quantities are additive, in the example
	// above the GPU quota in total is 20 (10 k80 + 10 p100).
	// A workload is limited to the selected type by converting the labels to a node
	// selector that gets injected into the workload. This list can’t be empty, at
	// least one flavor must exist.
	//
	// flavors can be up to 16 elements.
	//
	// +listType=map
	// +listMapKey=name
	Flavors []Flavor `json:"flavors,omitempty"`
}

func (*Resource) DeepCopy

func (in *Resource) DeepCopy() *Resource

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

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

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

type ResourceFlavor

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

	// taints associated with this flavor that workloads must explicitly
	// “tolerate” to be able to use this flavor.
	// For example, cloud.provider.com/preemptible="true":NoSchedule
	//
	// taints can be up to 8 elements.
	//
	// +listType=atomic
	Taints []corev1.Taint `json:"taints,omitempty"`
}

ResourceFlavor is the Schema for the resourceflavors API.

.metadata.labels associated with this flavor are matched against or converted to node affinity constraints on the workload’s pods. .metadata.labels can be up to 8 elements.

func (*ResourceFlavor) DeepCopy

func (in *ResourceFlavor) DeepCopy() *ResourceFlavor

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

func (*ResourceFlavor) DeepCopyInto

func (in *ResourceFlavor) DeepCopyInto(out *ResourceFlavor)

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

func (*ResourceFlavor) DeepCopyObject

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

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

type ResourceFlavorList

type ResourceFlavorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ResourceFlavor `json:"items"`
}

ResourceFlavorList contains a list of ResourceFlavor

func (*ResourceFlavorList) DeepCopy

func (in *ResourceFlavorList) DeepCopy() *ResourceFlavorList

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

func (*ResourceFlavorList) DeepCopyInto

func (in *ResourceFlavorList) DeepCopyInto(out *ResourceFlavorList)

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

func (*ResourceFlavorList) DeepCopyObject

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

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

type ResourceFlavorReference

type ResourceFlavorReference string

ResourceFlavorReference is the name of the ResourceFlavor.

type Usage

type Usage struct {
	// Total is the total quantity of the resource used, including resources
	// borrowed from the cohort.
	Total *resource.Quantity `json:"total,omitempty"`

	// Borrowed is the used quantity past the min quota, borrowed from the cohort.
	Borrowed *resource.Quantity `json:"borrowing,omitempty"`
}

func (*Usage) DeepCopy

func (in *Usage) DeepCopy() *Usage

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

func (*Usage) DeepCopyInto

func (in *Usage) DeepCopyInto(out *Usage)

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

type UsedResources

type UsedResources map[corev1.ResourceName]map[string]Usage

func (UsedResources) DeepCopy

func (in UsedResources) DeepCopy() UsedResources

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

func (UsedResources) DeepCopyInto

func (in UsedResources) DeepCopyInto(out *UsedResources)

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

type Workload

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

	Spec   WorkloadSpec   `json:"spec,omitempty"`
	Status WorkloadStatus `json:"status,omitempty"`
}

Workload is the Schema for the workloads API

func (*Workload) DeepCopy

func (in *Workload) DeepCopy() *Workload

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

func (*Workload) DeepCopyInto

func (in *Workload) DeepCopyInto(out *Workload)

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

func (*Workload) DeepCopyObject

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

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

type WorkloadList

type WorkloadList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Workload `json:"items"`
}

WorkloadList contains a list of ResourceClaim

func (*WorkloadList) DeepCopy

func (in *WorkloadList) DeepCopy() *WorkloadList

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

func (*WorkloadList) DeepCopyInto

func (in *WorkloadList) DeepCopyInto(out *WorkloadList)

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

func (*WorkloadList) DeepCopyObject

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

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

type WorkloadSpec

type WorkloadSpec struct {
	// podSets is a list of sets of homogeneous pods, each described by a Pod spec
	// and a count.
	// There must be at least one element and at most 8.
	// podSets cannot be changed.
	//
	// +listType=map
	// +listMapKey=name
	PodSets []PodSet `json:"podSets,omitempty"`

	// queueName is the name of the queue the Workload is associated with.
	// queueName cannot be changed once set.
	QueueName string `json:"queueName,omitempty"`

	// admission holds the parameters of the admission of the workload by a ClusterQueue.
	// admission cannot be changed once set.
	Admission *Admission `json:"admission,omitempty"`

	// If specified, indicates the workload'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 workload
	// priority will be default or zero if there is no default.
	PriorityClassName string `json:"priorityClassName,omitempty"`

	// Priority determines the order of access to the resources managed by the
	// ClusterQueue where the workload is queued.
	// The priority value is populated from PriorityClassName.
	// The higher the value, the higher the priority.
	// If priorityClassName is specified, priority must not be null.
	Priority *int32 `json:"priority,omitempty"`
}

WorkloadSpec defines the desired state of Workload

func (*WorkloadSpec) DeepCopy

func (in *WorkloadSpec) DeepCopy() *WorkloadSpec

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

func (*WorkloadSpec) DeepCopyInto

func (in *WorkloadSpec) DeepCopyInto(out *WorkloadSpec)

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

type WorkloadStatus

type WorkloadStatus struct {
	// conditions hold the latest available observations of the Workload
	// current state.
	//
	// The type of the condition could be:
	//
	// - Admitted: the Workload was admitted through a ClusterQueue.
	// - Finished: the associated workload finished running (failed or succeeded).
	//
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

WorkloadStatus defines the observed state of Workload

func (*WorkloadStatus) DeepCopy

func (in *WorkloadStatus) DeepCopy() *WorkloadStatus

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

func (*WorkloadStatus) DeepCopyInto

func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus)

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