scheduling

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 506

Documentation

Index

Constants

View Source
const (
	// DefaultPriorityWhenNoDefaultClassExists is used to set priority of pods
	// that do not specify any priority class and there is no priority class
	// marked as default.
	DefaultPriorityWhenNoDefaultClassExists = 0
	// HighestUserDefinablePriority is the highest priority for user defined priority classes. Priority values larger than 1 billion are reserved for Kubernetes system use.
	HighestUserDefinablePriority = int32(1000000000)
	// SystemCriticalPriority is the beginning of the range of priority values for critical system components.
	SystemCriticalPriority = 2 * HighestUserDefinablePriority
	// SystemPriorityClassPrefix is the prefix reserved for system priority class names. Other priority
	// classes are not allowed to start with this prefix.
	// NOTE: In order to avoid conflict of names with user-defined priority classes, all the names must
	// start with SystemPriorityClassPrefix.
	SystemPriorityClassPrefix = "system-"
	// SystemClusterCritical is the system priority class name that represents cluster-critical.
	SystemClusterCritical = SystemPriorityClassPrefix + "cluster-critical"
	// SystemNodeCritical is the system priority class name that represents node-critical.
	SystemNodeCritical = SystemPriorityClassPrefix + "node-critical"

	// PodGroupProtectionFinalizer is the finalizer added to PodGroups to prevent
	// premature deletion while pods still reference them.
	PodGroupProtectionFinalizer = GroupName + "/podgroup-protection"
)
View Source
const (
	// PodGroupScheduled represents status of the scheduling process for this PodGroup.
	PodGroupScheduled string = "PodGroupScheduled"
	// DisruptionTarget indicates the PodGroup is about to be terminated due to disruption
	// such as preemption.
	DisruptionTarget string = "DisruptionTarget"
)

Well-known condition types for PodGroups.

View Source
const (
	// Unschedulable reason in the PodGroupScheduled condition indicates that the PodGroup cannot be scheduled
	// due to resource constraints, affinity/anti-affinity rules, or insufficient capacity for the PodGroup.
	PodGroupReasonUnschedulable string = "Unschedulable"
	// SchedulerError reason in the PodGroupScheduled condition means that some internal error happens
	// during scheduling, for example due to nodeAffinity parsing errors.
	PodGroupReasonSchedulerError string = "SchedulerError"
	// PreemptionByScheduler reason in the DisruptionTarget condition indicates the PodGroup was preempted
	// to make room for higher-priority PodGroups or Pods.
	PodGroupReasonPreemptionByScheduler string = "PreemptionByScheduler"
)

Well-known condition reasons for PodGroups.

View Source
const GroupName = "scheduling.k8s.io"

GroupName is the group name use in this package

View Source
const MaxPodGroupResourceClaims = 4

MaxPodGroupResourceClaims is the maximum number of resource claims for a PodGroup or a Workload's PodGroupTemplate.

View Source
const WorkloadMaxPodGroupTemplates = 8

WorkloadMaxPodGroupTemplates is the maximum number of pod group templates per Workload.

Variables

View Source
var (
	// SchemeBuilder points to a list of functions added to Scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme applies all the stored functions to the scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

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 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 BasicSchedulingPolicy added in v1.35.0

type BasicSchedulingPolicy struct {
}

BasicSchedulingPolicy indicates that standard Kubernetes scheduling behavior should be used.

func (*BasicSchedulingPolicy) DeepCopy added in v1.35.0

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

func (*BasicSchedulingPolicy) DeepCopyInto added in v1.35.0

func (in *BasicSchedulingPolicy) DeepCopyInto(out *BasicSchedulingPolicy)

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

type DisruptionMode added in v1.36.0

type DisruptionMode string

DisruptionMode describes the mode in which a PodGroup can be disrupted (e.g. preempted). +enum

const (
	// DisruptionModePod means that individual pods can be disrupted or preempted independently.
	// It doesn't depend on exact set of pods currently running in this PodGroup.
	DisruptionModePod DisruptionMode = "Pod"
	// DisruptionModePodGroup means that the whole PodGroup needs to be disrupted
	// or preempted together.
	DisruptionModePodGroup DisruptionMode = "PodGroup"
)

type GangSchedulingPolicy added in v1.35.0

type GangSchedulingPolicy struct {
	// MinCount is the minimum number of pods that must be schedulable or scheduled
	// at the same time for the scheduler to admit the entire group.
	// It must be a positive integer.
	//
	// +required
	MinCount int32
}

GangSchedulingPolicy defines the parameters for gang scheduling.

func (*GangSchedulingPolicy) DeepCopy added in v1.35.0

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

func (*GangSchedulingPolicy) DeepCopyInto added in v1.35.0

func (in *GangSchedulingPolicy) DeepCopyInto(out *GangSchedulingPolicy)

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

type PodGroup added in v1.35.0

type PodGroup struct {
	metav1.TypeMeta
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	//
	// +optional
	metav1.ObjectMeta

	// Spec defines the desired state of the PodGroup.
	//
	// +required
	Spec PodGroupSpec

	// Status represents the current observed state of the PodGroup.
	//
	// +optional
	Status PodGroupStatus
}

PodGroup represents a runtime instance of pods grouped together. PodGroups are created by workload controllers (Job, LWS, JobSet, etc...) from Workload.podGroupTemplates. PodGroup API enablement is toggled by the GenericWorkload feature gate.

func (*PodGroup) DeepCopy added in v1.35.0

func (in *PodGroup) DeepCopy() *PodGroup

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

func (*PodGroup) DeepCopyInto added in v1.35.0

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 added in v1.36.0

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

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

type PodGroupList added in v1.36.0

type PodGroupList struct {
	metav1.TypeMeta
	// Standard list metadata.
	//
	// +optional
	metav1.ListMeta

	// Items is the list of PodGroups.
	Items []PodGroup
}

PodGroupList contains a list of PodGroup resources.

func (*PodGroupList) DeepCopy added in v1.36.0

func (in *PodGroupList) DeepCopy() *PodGroupList

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

func (*PodGroupList) DeepCopyInto added in v1.36.0

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 added in v1.36.0

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

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

type PodGroupResourceClaim added in v1.36.0

type PodGroupResourceClaim struct {
	// Name uniquely identifies this resource claim inside the PodGroup.
	// This must be a DNS_LABEL.
	//
	// +required
	Name string

	// ResourceClaimName is the name of a ResourceClaim object in the same
	// namespace as this PodGroup. The ResourceClaim will be reserved for the
	// PodGroup instead of its individual pods.
	//
	// Exactly one of ResourceClaimName and ResourceClaimTemplateName must
	// be set.
	//
	// +optional
	ResourceClaimName *string

	// ResourceClaimTemplateName is the name of a ResourceClaimTemplate
	// object in the same namespace as this PodGroup.
	//
	// The template will be used to create a new ResourceClaim, which will
	// be bound to this PodGroup. When this PodGroup is deleted, the ResourceClaim
	// will also be deleted. The PodGroup name and resource name, along with a
	// generated component, will be used to form a unique name for the
	// ResourceClaim, which will be recorded in podgroup.status.resourceClaimStatuses.
	//
	// This field is immutable and no changes will be made to the
	// corresponding ResourceClaim by the control plane after creating the
	// ResourceClaim.
	//
	// Exactly one of ResourceClaimName and ResourceClaimTemplateName must
	// be set.
	//
	// +optional
	ResourceClaimTemplateName *string
}

PodGroupResourceClaim references exactly one ResourceClaim, either directly or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim for the PodGroup.

It adds a name to it that uniquely identifies the ResourceClaim inside the PodGroup. Pods that need access to the ResourceClaim define a matching reference in its own Spec.ResourceClaims. The Pod's claim must match all fields of the PodGroup's claim exactly.

func (*PodGroupResourceClaim) DeepCopy added in v1.36.0

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

func (*PodGroupResourceClaim) DeepCopyInto added in v1.36.0

func (in *PodGroupResourceClaim) DeepCopyInto(out *PodGroupResourceClaim)

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

type PodGroupResourceClaimStatus added in v1.36.0

type PodGroupResourceClaimStatus struct {
	// Name uniquely identifies this resource claim inside the PodGroup. This
	// must match the name of an entry in podgroup.spec.resourceClaims, which
	// implies that the string must be a DNS_LABEL.
	//
	// +required
	Name string

	// ResourceClaimName is the name of the ResourceClaim that was generated for
	// the PodGroup in the namespace of the PodGroup. If this is unset, then
	// generating a ResourceClaim was not necessary. The
	// podgroup.spec.resourceClaims entry can be ignored in this case.
	//
	// +optional
	ResourceClaimName *string
}

PodGroupResourceClaimStatus is stored in the PodGroupStatus for each PodGroupResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim.

func (*PodGroupResourceClaimStatus) DeepCopy added in v1.36.0

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

func (*PodGroupResourceClaimStatus) DeepCopyInto added in v1.36.0

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

type PodGroupSchedulingConstraints added in v1.36.0

type PodGroupSchedulingConstraints struct {
	// Topology defines the topology constraints for the pod group.
	// Currently only a single topology constraint can be specified. This may change in the future.
	//
	// +optional
	// +listType=atomic
	Topology []TopologyConstraint
}

PodGroupSchedulingConstraints defines scheduling constraints (e.g. topology) for a PodGroup.

func (*PodGroupSchedulingConstraints) DeepCopy added in v1.36.0

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

func (*PodGroupSchedulingConstraints) DeepCopyInto added in v1.36.0

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

type PodGroupSchedulingPolicy added in v1.36.0

type PodGroupSchedulingPolicy struct {
	// Basic specifies that the pods in this group should be scheduled using
	// standard Kubernetes scheduling behavior.
	//
	// +optional
	Basic *BasicSchedulingPolicy

	// Gang specifies that the pods in this group should be scheduled using
	// all-or-nothing semantics.
	//
	// +optional
	Gang *GangSchedulingPolicy
}

PodGroupSchedulingPolicy defines the scheduling configuration for a PodGroup. Exactly one policy must be set. +union

func (*PodGroupSchedulingPolicy) DeepCopy added in v1.36.0

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

func (*PodGroupSchedulingPolicy) DeepCopyInto added in v1.36.0

func (in *PodGroupSchedulingPolicy) DeepCopyInto(out *PodGroupSchedulingPolicy)

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

type PodGroupSpec added in v1.36.0

type PodGroupSpec struct {
	// PodGroupTemplateRef references an optional PodGroup template within other object
	// (e.g. Workload) that was used to create the PodGroup. This field is immutable.
	//
	// +optional
	PodGroupTemplateRef *PodGroupTemplateReference

	// SchedulingPolicy defines the scheduling policy for this instance of the PodGroup.
	// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
	// This field is immutable.
	//
	// +required
	SchedulingPolicy PodGroupSchedulingPolicy

	// SchedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroup.
	// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
	// This field is immutable.
	// This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled.
	//
	// +optional
	// +featureGate=TopologyAwareWorkloadScheduling
	SchedulingConstraints *PodGroupSchedulingConstraints

	// ResourceClaims defines which ResourceClaims may be shared among Pods in
	// the group. Pods must reference these claims in order to consume the
	// allocated devices.
	//
	// This is an alpha-level field and requires that the
	// DRAWorkloadResourceClaims feature gate is enabled.
	//
	// This field is immutable.
	//
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge,retainKeys
	// +listType=map
	// +listMapKey=name
	// +featureGate=DRAWorkloadResourceClaims
	ResourceClaims []PodGroupResourceClaim

	// DisruptionMode defines the mode in which a given PodGroup can be disrupted.
	// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
	// One of Pod, PodGroup. Defaults to Pod if unset.
	// This field is immutable.
	// This field is available only when the WorkloadAwarePreemption feature gate
	// is enabled.
	//
	// +featureGate=WorkloadAwarePreemption
	// +optional
	DisruptionMode *DisruptionMode

	// PriorityClassName defines the priority that should be considered when scheduling this pod group.
	// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
	// Otherwise, it is validated and resolved similarly to the PriorityClassName on PodGroupTemplate
	// (i.e. if no priority class is specified, admission control can set this to the global default
	// priority class if it exists. Otherwise, the pod group's priority will be zero).
	// This field is immutable.
	// This field is available only when the WorkloadAwarePreemption feature gate
	// is enabled.
	//
	// +featureGate=WorkloadAwarePreemption
	// +optional
	PriorityClassName string

	// Priority is the value of priority of this pod group. Various system components
	// use this field to find the priority of the pod group. When Priority Admission
	// Controller is enabled, it prevents users from setting this field. The admission
	// controller populates this field from PriorityClassName.
	// The higher the value, the higher the priority.
	// This field is immutable.
	// This field is available only when the WorkloadAwarePreemption feature gate
	// is enabled.
	//
	// +featureGate=WorkloadAwarePreemption
	// +optional
	Priority *int32
}

PodGroupSpec defines the desired state of a PodGroup.

func (*PodGroupSpec) DeepCopy added in v1.36.0

func (in *PodGroupSpec) DeepCopy() *PodGroupSpec

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

func (*PodGroupSpec) DeepCopyInto added in v1.36.0

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 added in v1.36.0

type PodGroupStatus struct {
	// Conditions represent the latest observations of the PodGroup's state.
	//
	// Known condition types:
	// - "PodGroupScheduled": Indicates whether the scheduling requirement has been satisfied.
	// - "DisruptionTarget": Indicates whether the PodGroup is about to be terminated
	//   due to disruption such as preemption.
	//
	// Known reasons for the PodGroupScheduled condition:
	// - "Unschedulable": The PodGroup cannot be scheduled due to resource constraints,
	//   affinity/anti-affinity rules, or insufficient capacity for the gang.
	// - "SchedulerError": The PodGroup cannot be scheduled due to some internal error
	//   that happened during scheduling, for example due to nodeAffinity parsing errors.
	//
	// Known reasons for the DisruptionTarget condition:
	// - "PreemptionByScheduler": The PodGroup was preempted by the scheduler to make room for
	//   higher-priority PodGroups or Pods.
	//
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition

	// Status of resource claims.
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge,retainKeys
	// +listType=map
	// +listMapKey=name
	// +featureGate=DRAWorkloadResourceClaims
	ResourceClaimStatuses []PodGroupResourceClaimStatus
}

PodGroupStatus represents information about the status of a pod group.

func (*PodGroupStatus) DeepCopy added in v1.36.0

func (in *PodGroupStatus) DeepCopy() *PodGroupStatus

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

func (*PodGroupStatus) DeepCopyInto added in v1.36.0

func (in *PodGroupStatus) DeepCopyInto(out *PodGroupStatus)

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

type PodGroupTemplate added in v1.36.0

type PodGroupTemplate struct {
	// Name is a unique identifier for the PodGroupTemplate within the Workload.
	// It must be a DNS label. This field is immutable.
	//
	// +required
	Name string

	// SchedulingPolicy defines the scheduling policy for this PodGroupTemplate.
	//
	// +required
	SchedulingPolicy PodGroupSchedulingPolicy

	// SchedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroupTemplate.
	// This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled.
	//
	// +optional
	// +featureGate=TopologyAwareWorkloadScheduling
	SchedulingConstraints *PodGroupSchedulingConstraints

	// ResourceClaims defines which ResourceClaims may be shared among Pods in
	// the group. Pods consume the devices allocated to a PodGroup's claim by
	// defining a claim in its own Spec.ResourceClaims that matches the
	// PodGroup's claim exactly. The claim must have the same name and refer to
	// the same ResourceClaim or ResourceClaimTemplate.
	//
	// This is an alpha-level field and requires that the
	// DRAWorkloadResourceClaims feature gate is enabled.
	//
	// This field is immutable.
	//
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge,retainKeys
	// +listType=map
	// +listMapKey=name
	// +featureGate=DRAWorkloadResourceClaims
	ResourceClaims []PodGroupResourceClaim

	// DisruptionMode defines the mode in which a given PodGroup can be disrupted.
	// One of Pod, PodGroup.
	// This field is available only when the WorkloadAwarePreemption feature gate
	// is enabled.
	//
	// +featureGate=WorkloadAwarePreemption
	// +optional
	DisruptionMode *DisruptionMode

	// PriorityClassName indicates the priority that should be considered when scheduling
	// a pod group created from this template. If no priority class is specified, admission
	// control can set this to the global default priority class if it exists. Otherwise,
	// pod groups created from this template will have the priority set to zero.
	// This field is available only when the WorkloadAwarePreemption feature gate
	// is enabled.
	//
	// +featureGate=WorkloadAwarePreemption
	// +optional
	PriorityClassName string

	// Priority is the value of priority of pod groups created from this template. Various
	// system components use this field to find the priority of the pod group. When
	// Priority Admission Controller is enabled, it prevents users from setting this field.
	// The admission controller populates this field from PriorityClassName.
	// The higher the value, the higher the priority.
	// This field is available only when the WorkloadAwarePreemption feature gate
	// is enabled.
	//
	// +featureGate=WorkloadAwarePreemption
	// +optional
	Priority *int32
}

PodGroupTemplate represents a template for a set of pods with a scheduling policy.

func (*PodGroupTemplate) DeepCopy added in v1.36.0

func (in *PodGroupTemplate) DeepCopy() *PodGroupTemplate

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

func (*PodGroupTemplate) DeepCopyInto added in v1.36.0

func (in *PodGroupTemplate) DeepCopyInto(out *PodGroupTemplate)

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

type PodGroupTemplateReference added in v1.36.0

type PodGroupTemplateReference struct {
	// Workload references the PodGroupTemplate within the Workload object that was used to create
	// the PodGroup.
	//
	// +optional
	Workload *WorkloadPodGroupTemplateReference
}

PodGroupTemplateReference references a PodGroup template defined in some object (e.g. Workload). Exactly one reference must be set. +union

func (*PodGroupTemplateReference) DeepCopy added in v1.36.0

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

func (*PodGroupTemplateReference) DeepCopyInto added in v1.36.0

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

type PriorityClass

type PriorityClass struct {
	metav1.TypeMeta
	// Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
	// +optional
	metav1.ObjectMeta

	// value represents the integer value of this priority class. This is the actual priority that pods
	// receive when they have the name of this class in their pod spec.
	Value int32

	// globalDefault specifies whether this PriorityClass should be considered as
	// the default priority for pods that do not have any priority class.
	// Only one PriorityClass can be marked as `globalDefault`. However, if more than
	// one PriorityClasses exists with their `globalDefault` field set to true,
	// the smallest value of such global default PriorityClasses will be used as the default priority.
	// +optional
	GlobalDefault bool

	// description is an arbitrary string that usually provides guidelines on
	// when this priority class should be used.
	// +optional
	Description string

	// preemptionPolicy it the Policy for preempting pods with lower priority.
	// One of Never, PreemptLowerPriority.
	// Defaults to PreemptLowerPriority if unset.
	// +optional
	PreemptionPolicy *core.PreemptionPolicy
}

PriorityClass defines the mapping from a priority class name to the priority integer value. The value can be any valid integer.

func (*PriorityClass) DeepCopy

func (in *PriorityClass) DeepCopy() *PriorityClass

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

func (*PriorityClass) DeepCopyInto

func (in *PriorityClass) DeepCopyInto(out *PriorityClass)

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

func (*PriorityClass) DeepCopyObject

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

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

type PriorityClassList

type PriorityClassList struct {
	metav1.TypeMeta
	// Standard list metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
	// +optional
	metav1.ListMeta

	// items is the list of PriorityClasses.
	Items []PriorityClass
}

PriorityClassList is a collection of priority classes.

func (*PriorityClassList) DeepCopy

func (in *PriorityClassList) DeepCopy() *PriorityClassList

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

func (*PriorityClassList) DeepCopyInto

func (in *PriorityClassList) DeepCopyInto(out *PriorityClassList)

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

func (*PriorityClassList) DeepCopyObject

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

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

type TopologyConstraint added in v1.36.0

type TopologyConstraint struct {
	// Key specifies the key of the node label representing the topology domain.
	// All pods within the PodGroup must be colocated within the same domain instance.
	// Different PodGroups can land on different domain instances even if they derive from the same PodGroupTemplate.
	// Examples: "topology.kubernetes.io/rack"
	//
	// +required
	Key string
}

TopologyConstraint defines a topology constraint for a PodGroup.

func (*TopologyConstraint) DeepCopy added in v1.36.0

func (in *TopologyConstraint) DeepCopy() *TopologyConstraint

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

func (*TopologyConstraint) DeepCopyInto added in v1.36.0

func (in *TopologyConstraint) DeepCopyInto(out *TopologyConstraint)

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

type TypedLocalObjectReference added in v1.35.0

type TypedLocalObjectReference struct {
	// APIGroup is the group for the resource being referenced.
	// If APIGroup is empty, the specified Kind must be in the core API group.
	// For any other third-party types, setting APIGroup is required.
	// It must be a DNS subdomain.
	//
	// +optional
	APIGroup string
	// Kind is the type of resource being referenced.
	// It must be a path segment name.
	//
	// +required
	Kind string
	// Name is the name of resource being referenced.
	// It must be a path segment name.
	//
	// +required
	Name string
}

TypedLocalObjectReference allows to reference typed object inside the same namespace.

func (*TypedLocalObjectReference) DeepCopy added in v1.35.0

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

func (*TypedLocalObjectReference) DeepCopyInto added in v1.35.0

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

type Workload added in v1.35.0

type Workload struct {
	metav1.TypeMeta
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	//
	// +optional
	metav1.ObjectMeta

	// Spec defines the desired behavior of a Workload.
	//
	// +required
	Spec WorkloadSpec
}

Workload allows for expressing scheduling constraints that should be used when managing the lifecycle of workloads from the scheduling perspective, including scheduling, preemption, eviction and other phases. Workload API enablement is toggled by the GenericWorkload feature gate.

func (*Workload) DeepCopy added in v1.35.0

func (in *Workload) DeepCopy() *Workload

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

func (*Workload) DeepCopyInto added in v1.35.0

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 added in v1.35.0

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

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

type WorkloadList added in v1.35.0

type WorkloadList struct {
	metav1.TypeMeta
	// Standard list metadata.
	//
	// +optional
	metav1.ListMeta

	// Items is the list of Workloads.
	Items []Workload
}

WorkloadList contains a list of Workload resources.

func (*WorkloadList) DeepCopy added in v1.35.0

func (in *WorkloadList) DeepCopy() *WorkloadList

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

func (*WorkloadList) DeepCopyInto added in v1.35.0

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 added in v1.35.0

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

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

type WorkloadPodGroupTemplateReference added in v1.36.0

type WorkloadPodGroupTemplateReference struct {
	// WorkloadName defines the name of the Workload object.
	//
	// +required
	WorkloadName string

	// PodGroupTemplateName defines the PodGroupTemplate name within the Workload object.
	//
	// +required
	PodGroupTemplateName string
}

WorkloadPodGroupTemplateReference references the PodGroupTemplate within the Workload object.

func (*WorkloadPodGroupTemplateReference) DeepCopy added in v1.36.0

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

func (*WorkloadPodGroupTemplateReference) DeepCopyInto added in v1.36.0

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

type WorkloadSpec added in v1.35.0

type WorkloadSpec struct {
	// ControllerRef is an optional reference to the controlling object, such as a
	// Deployment or Job. This field is intended for use by tools like CLIs
	// to provide a link back to the original workload definition.
	// This field is immutable.
	//
	// +optional
	ControllerRef *TypedLocalObjectReference

	// PodGroupTemplates is the list of templates that make up the Workload.
	// The maximum number of templates is 8. This field is immutable.
	//
	// +required
	// +listType=map
	// +listMapKey=name
	PodGroupTemplates []PodGroupTemplate
}

WorkloadSpec defines the desired state of a Workload.

func (*WorkloadSpec) DeepCopy added in v1.35.0

func (in *WorkloadSpec) DeepCopy() *WorkloadSpec

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

func (*WorkloadSpec) DeepCopyInto added in v1.35.0

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

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

Directories

Path Synopsis
Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery.
Package install installs the experimental API group, making it available as an option to all of the API encoding/decoding machinery.

Jump to

Keyboard shortcuts

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