Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions apis/kueue/v1alpha1/topology_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@ const (
// +kubebuilder:validation:Type=boolean
PodSetUnconstrainedTopologyAnnotation = "kueue.x-k8s.io/podset-unconstrained-topology"

// PodSetSliceRequiredTopologyAnnotation indicates that a PodSet requires
// Topology Aware Scheduling, and requires scheduling each PodSet slice on nodes
// within the topology domain corresponding to the topology level
// indicated by the annotation value (e.g. within a rack or within a block).
PodSetSliceRequiredTopologyAnnotation = "kueue.x-k8s.io/podset-slice-required-topology"

// PodSetSliceSizeAnnotation describes the requested size of a podset slice
// for which Kueue finds a requested topology domain.
//
// This annotation is required if `kueue.x-k8s.io/podset-slice-required-topology`
// is defined.
PodSetSliceSizeAnnotation = "kueue.x-k8s.io/podset-slice-size"

// TopologySchedulingGate is used to delay scheduling of a Pod until the
// nodeSelectors corresponding to the assigned topology domain are injected
// into the Pod. For the Pod-based integrations the gate is added in webhook
Expand Down
13 changes: 13 additions & 0 deletions apis/kueue/v1beta1/workload_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ type PodSetTopologyRequest struct {
// SubGroupIndexLabel indicates the count of replicated Jobs (groups) within a PodSet.
// For example, in the context of JobSet this value is read from jobset.sigs.k8s.io/replicatedjob-replicas.
SubGroupCount *int32 `json:"subGroupCount,omitempty"`

// PodSetSliceRequiredTopology indicates the topology level required by the PodSet slice, as
// indicated by the `kueue.x-k8s.io/podset-slice-required-topology` annotation.
//
// +optional
PodSetSliceRequiredTopology *string `json:"podSetSliceRequiredTopology,omitempty"`

// PodSetSliceSize indicates the size of a subgroup of pods in a PodSet for which
// Kueue finds a requested topology domain on a level defined
// in `kueue.x-k8s.io/podset-slice-required-topology` annotation.
//
// +optional
PodSetSliceSize *int32 `json:"podSetSliceSize,omitempty"`
}

type Admission struct {
Expand Down
10 changes: 10 additions & 0 deletions apis/kueue/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions charts/kueue/templates/crd/kueue.x-k8s.io_workloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7833,6 +7833,18 @@ spec:
- JobSet: kubernetes.io/job-completion-index (inherited from Job)
- Kubeflow: training.kubeflow.org/replica-index
type: string
podSetSliceRequiredTopology:
description: |-
PodSetSliceRequiredTopology indicates the topology level required by the PodSet slice, as
indicated by the `kueue.x-k8s.io/podset-slice-required-topology` annotation.
type: string
podSetSliceSize:
description: |-
PodSetSliceSize indicates the size of a subgroup of pods in a PodSet for which
Kueue finds a requested topology domain on a level defined
in `kueue.x-k8s.io/podset-slice-required-topology` annotation.
format: int32
type: integer
preferred:
description: |-
preferred indicates the topology level preferred by the PodSet, as
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions config/components/crd/bases/kueue.x-k8s.io_workloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8299,6 +8299,18 @@ spec:
- JobSet: kubernetes.io/job-completion-index (inherited from Job)
- Kubeflow: training.kubeflow.org/replica-index
type: string
podSetSliceRequiredTopology:
description: |-
PodSetSliceRequiredTopology indicates the topology level required by the PodSet slice, as
indicated by the `kueue.x-k8s.io/podset-slice-required-topology` annotation.
type: string
podSetSliceSize:
description: |-
PodSetSliceSize indicates the size of a subgroup of pods in a PodSet for which
Kueue finds a requested topology domain on a level defined
in `kueue.x-k8s.io/podset-slice-required-topology` annotation.
format: int32
type: integer
preferred:
description: |-
preferred indicates the topology level preferred by the PodSet, as
Expand Down
17 changes: 17 additions & 0 deletions site/content/en/docs/reference/kueue.v1beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2045,6 +2045,23 @@ within a PodSet. For example, in the context of JobSet this is jobset.sigs.k8s.i
For example, in the context of JobSet this value is read from jobset.sigs.k8s.io/replicatedjob-replicas.</p>
</td>
</tr>
<tr><td><code>podSetSliceRequiredTopology</code><br/>
<code>string</code>
</td>
<td>
<p>PodSetSliceRequiredTopology indicates the topology level required by the PodSet slice, as
indicated by the <code>kueue.x-k8s.io/podset-slice-required-topology</code> annotation.</p>
</td>
</tr>
<tr><td><code>podSetSliceSize</code><br/>
<code>int32</code>
</td>
<td>
<p>PodSetSliceSize indicates the size of a subgroup of pods in a PodSet for which
Kueue finds a requested topology domain on a level defined
in <code>kueue.x-k8s.io/podset-slice-required-topology</code> annotation.</p>
</td>
</tr>
</tbody>
</table>

Expand Down