diff --git a/docs/api-reference/scheduler-api.md b/docs/api-reference/scheduler-api.md index ba874d346..3d8e135ba 100644 --- a/docs/api-reference/scheduler-api.md +++ b/docs/api-reference/scheduler-api.md @@ -159,6 +159,7 @@ _Appears in:_ | Field | Description | Default | Validation | | --- | --- | --- | --- | +| `name` _string_ | Name is the name of the topology constraint group.
It will drive from the corresponding PCSG name. | | | | `podGroupNames` _string array_ | PodGroupNames is the list of PodGroup names in the topology constraint group. | | | | `topologyConstraint` _[TopologyConstraint](#topologyconstraint)_ | TopologyConstraint defines topology packing constraints for this group.
Enables PCSG-level topology constraints.
Updated by operator when PodCliqueScalingGroup topology constraints change. | | | diff --git a/docs/designs/topology.md b/docs/designs/topology.md index 3d761add4..37d36b798 100644 --- a/docs/designs/topology.md +++ b/docs/designs/topology.md @@ -568,6 +568,9 @@ type PodGangSpec struct { ```go // TopologyConstraintGroupConfig defines topology constraints for a group of PodGroups. type TopologyConstraintGroupConfig struct { + // Name is the name of the topology constraint group. + // It will drive from the corresponding PCSG name. + Name string `json:"name"` // TopologyConstraint defines topology packing constraints for this group. // Enables PCSG-level topology constraints. // Updated by operator when PodCliqueScalingGroup topology constraints change. diff --git a/scheduler/api/core/v1alpha1/crds/scheduler.grove.io_podgangs.yaml b/scheduler/api/core/v1alpha1/crds/scheduler.grove.io_podgangs.yaml index 3cf4c8f40..30bf4f47b 100644 --- a/scheduler/api/core/v1alpha1/crds/scheduler.grove.io_podgangs.yaml +++ b/scheduler/api/core/v1alpha1/crds/scheduler.grove.io_podgangs.yaml @@ -167,6 +167,11 @@ spec: description: TopologyConstraintGroupConfig defines topology constraints for a group of PodGroups. properties: + name: + description: |- + Name is the name of the topology constraint group. + It will drive from the corresponding PCSG name. + type: string podGroupNames: description: PodGroupNames is the list of PodGroup names in the topology constraint group. @@ -200,6 +205,7 @@ spec: type: object type: object required: + - name - podGroupNames type: object type: array diff --git a/scheduler/api/core/v1alpha1/podgang.go b/scheduler/api/core/v1alpha1/podgang.go index c31f5bcfe..ae9ee5448 100644 --- a/scheduler/api/core/v1alpha1/podgang.go +++ b/scheduler/api/core/v1alpha1/podgang.go @@ -115,6 +115,9 @@ type TopologyPackConstraint struct { // TopologyConstraintGroupConfig defines topology constraints for a group of PodGroups. type TopologyConstraintGroupConfig struct { + // Name is the name of the topology constraint group. + // It will drive from the corresponding PCSG name. + Name string `json:"name"` // PodGroupNames is the list of PodGroup names in the topology constraint group. PodGroupNames []string `json:"podGroupNames"` // TopologyConstraint defines topology packing constraints for this group.