WorkloadSpec

io.k8s.api.scheduling.v1alpha3.WorkloadSpec source ↗

WorkloadSpec defines the desired state of a Workload.

compositePodGroupTemplates[]CompositePodGroupTemplatecompositePodGroupTemplates is the list of CompositePodGroup templates that make up the Workload. The maximum number of templates is 8. This field is immutable. Exactly one of CompositePodGroupTemplates and PodGroupTemplates must be set.This field is used only when the CompositePodGroup feature gate is enabled.
compositePodGroupTemplates[]CompositePodGroupTemplatecompositePodGroupTemplates is the list of templates for children CompositePodGroups. The maximum number of templates is 8. At least one entry in CompositePodGroupTemplates or PodGroupTemplates must be set.

↻ Recursive — see CompositePodGroupTemplate

disruptionModeCompositeDisruptionModedisruptionMode defines the mode in which a given CompositePodGroup can be disrupted. One of Single, All. This field is immutable.
allAllCompositeDisruptionModeall specifies that all children groups can only be disrupted together.
singleSingleCompositeDisruptionModesingle specifies that children groups can be disrupted independently from each other.
namestring requiredname is a unique identifier for the CompositePodGroupTemplate within the Workload. It must be a DNS label. This field is required.
podGroupTemplates[]PodGroupTemplatepodGroupTemplates is the list of templates for children PodGroups. The maximum number of templates is 8. At least one entry in CompositePodGroupTemplates or PodGroupTemplates must be set.
disruptionModeDisruptionModedisruptionMode defines the mode in which a given PodGroup can be disrupted. One of Single, All. This field is immutable.
allAllDisruptionModeall specifies that all children can only be disrupted together.
singleSingleDisruptionModesingle specifies that children can be disrupted independently from each other.
namestring requiredname is a unique identifier for the PodGroupTemplate within the Workload. It must be a DNS label. This field is immutable.
preemptionPolicystringpreemptionPolicy is the Policy for preempting pods/podgroups with lower priority. One of Never, PreemptLowerPriority. This field is immutable. This field is available only when the PodGroupPreemptionPolicy feature gate is enabled.
priorityinteger (int32)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. The higher the value, the higher the priority. This field is immutable.
priorityClassNamestringpriorityClassName indicates the priority that should be considered when scheduling a pod group created from this template. This field is immutable.
resourceClaims[]PodGroupResourceClaimresourceClaims 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 a beta-level field and requires that the DRAWorkloadResourceClaims feature gate is enabled.This field is immutable.
namestring requiredname uniquely identifies this resource claim inside the PodGroup. This must be a DNS_LABEL.
resourceClaimNamestringresourceClaimName 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.
resourceClaimTemplateNamestringresourceClaimTemplateName 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.
schedulingConstraintsPodGroupSchedulingConstraintsschedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroupTemplate. This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled. This field is immutable.
topology[]TopologyConstrainttopology defines the topology constraints for the pod group. Currently only a single topology constraint can be specified. This may change in the future.
keystring requiredkey 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"
schedulingPolicyPodGroupSchedulingPolicy requiredschedulingPolicy defines the scheduling policy for this PodGroupTemplate.
basicBasicSchedulingPolicybasic specifies that the pods in this group should be scheduled using standard Kubernetes scheduling behavior. Setting this field at group creation time opts this group to basic scheduling; this field cannot be changed afterward.
gangGangSchedulingPolicygang specifies that the pods in this group should be scheduled using all-or-nothing semantics. Setting this field at group creation time opts this group to gang scheduling; this field cannot be set or unset afterward. The minCount field within Gang scheduling policy remains mutable after group creation.
minCountinteger (int32) requiredminCount 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. This field is mutable to support workload scaling.Note that the scheduler operates on an eventually consistent model. Updates to minCount may not be immediately reflected in scheduling decisions due to propagation delays. If minCount is updated while a scheduling cycle is in progress for that group, the new value may not take effect until the next cycle. Moreover, minCount is only enforced during scheduling, meaning that modifications to this field do not affect already-scheduled pods, applying only to those evaluated in future cycles.
preemptionPolicystringpreemptionPolicy is the Policy for preempting pods/podgroups with lower priority. One of Never, PreemptLowerPriority. This field is immutable. This field is available only when the PodGroupPreemptionPolicy feature gate is enabled.
priorityinteger (int32)priority is the value of priority of composite pod groups created from this template. Various system components use this field to find the priority of the composite 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.
priorityClassNamestringpriorityClassName indicates the priority that should be considered when scheduling a composite 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, composite pod groups created from this template will have the priority set to zero. This field is immutable.
schedulingConstraintsCompositePodGroupSchedulingConstraintsschedulingConstraints defines optional scheduling constraints (e.g. topology) for this CompositePodGroupTemplate. This field is immutable.
topology[]TopologyConstrainttopology defines the topology constraints for the composite pod group. Currently only a single topology constraint can be specified. This may change in the future.
keystring requiredkey 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"
schedulingPolicyCompositePodGroupSchedulingPolicy requiredschedulingPolicy defines the scheduling policy for this template.
basicCompositeBasicSchedulingPolicybasic specifies that the groups of this composite group should be scheduled independently. This field is immutable.
gangCompositeGangSchedulingPolicygang specifies that the groups of this composite group should be scheduled using all-or-nothing semantics.
minGroupCountinteger (int32) requiredminGroupCount is the minimum number of child groups that must be schedulable or scheduled at the same time for the scheduler to admit the entire group. It must be a positive integer.
controllerRefTypedLocalObjectReferencecontrollerRef 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.
apiGroupstringapiGroup 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.
kindstring requiredkind is the type of resource being referenced. It must be a path segment name.
namestring requiredname is the name of resource being referenced. It must be a path segment name.
podGroupTemplates[]PodGroupTemplatepodGroupTemplates is the list of templates that make up the Workload. The maximum number of templates is 8. Templates cannot be added or removed after the workload is created. Existing templates may still be updated where their individual fields allow it. Exactly one of CompositePodGroupTemplates and PodGroupTemplates must be set.
disruptionModeDisruptionModedisruptionMode defines the mode in which a given PodGroup can be disrupted. One of Single, All. This field is immutable.
allAllDisruptionModeall specifies that all children can only be disrupted together.
singleSingleDisruptionModesingle specifies that children can be disrupted independently from each other.
namestring requiredname is a unique identifier for the PodGroupTemplate within the Workload. It must be a DNS label. This field is immutable.
preemptionPolicystringpreemptionPolicy is the Policy for preempting pods/podgroups with lower priority. One of Never, PreemptLowerPriority. This field is immutable. This field is available only when the PodGroupPreemptionPolicy feature gate is enabled.
priorityinteger (int32)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. The higher the value, the higher the priority. This field is immutable.
priorityClassNamestringpriorityClassName indicates the priority that should be considered when scheduling a pod group created from this template. This field is immutable.
resourceClaims[]PodGroupResourceClaimresourceClaims 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 a beta-level field and requires that the DRAWorkloadResourceClaims feature gate is enabled.This field is immutable.
namestring requiredname uniquely identifies this resource claim inside the PodGroup. This must be a DNS_LABEL.
resourceClaimNamestringresourceClaimName 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.
resourceClaimTemplateNamestringresourceClaimTemplateName 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.
schedulingConstraintsPodGroupSchedulingConstraintsschedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroupTemplate. This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled. This field is immutable.
topology[]TopologyConstrainttopology defines the topology constraints for the pod group. Currently only a single topology constraint can be specified. This may change in the future.
keystring requiredkey 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"
schedulingPolicyPodGroupSchedulingPolicy requiredschedulingPolicy defines the scheduling policy for this PodGroupTemplate.
basicBasicSchedulingPolicybasic specifies that the pods in this group should be scheduled using standard Kubernetes scheduling behavior. Setting this field at group creation time opts this group to basic scheduling; this field cannot be changed afterward.
gangGangSchedulingPolicygang specifies that the pods in this group should be scheduled using all-or-nothing semantics. Setting this field at group creation time opts this group to gang scheduling; this field cannot be set or unset afterward. The minCount field within Gang scheduling policy remains mutable after group creation.
minCountinteger (int32) requiredminCount 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. This field is mutable to support workload scaling.Note that the scheduler operates on an eventually consistent model. Updates to minCount may not be immediately reflected in scheduling decisions due to propagation delays. If minCount is updated while a scheduling cycle is in progress for that group, the new value may not take effect until the next cycle. Moreover, minCount is only enforced during scheduling, meaning that modifications to this field do not affect already-scheduled pods, applying only to those evaluated in future cycles.