DisaggregatedSet API
Resource Types
DisaggregatedSet
Appears in:
DisaggregatedSet is the Schema for the disaggregatedsets API
| Field | Description |
|---|---|
apiVersionstring | disaggregatedset.x-k8s.io/v1 |
kindstring | DisaggregatedSet |
spec [Required]DisaggregatedSetSpec | spec defines the desired state of DisaggregatedSet |
statusDisaggregatedSetStatus | status defines the observed state of DisaggregatedSet |
DisaggregatedRoleSpec
Appears in:
DisaggregatedRoleSpec defines the configuration for a disaggregated role. This structure embeds LeaderWorkerSetTemplateSpec from sigs.k8s.io/lws, with validation to reject unsupported fields (RolloutStrategy.Type must be RollingUpdate, RolloutStrategy.RollingUpdateConfiguration.Partition must not be set).
| Field | Description |
|---|---|
name [Required]string | Name is the unique identifier for this role. |
scalingRoleScaling | Scaling configures how replicas are determined. Omit for inline Static scaling (default). When set to External, the DisaggregatedSet controller auto-creates a DisaggregatedSetRoleScaler and reads its spec.replicas. |
LeaderWorkerSetTemplateSpec [Required]LeaderWorkerSetTemplateSpec | (Members of LeaderWorkerSetTemplateSpec are embedded into this type.)LeaderWorkerSetTemplateSpec defines the LWS template for this role. Note: Spec.RolloutStrategy.Type must be RollingUpdate (or empty) and Spec.RolloutStrategy.RollingUpdateConfiguration.Partition must not be set. DisaggregatedSet handles rollouts across roles. |
DisaggregatedSetRoleScaler
Appears in:
DisaggregatedSetRoleScaler exposes the /scale subresource for a single role of a DisaggregatedSet. Instances are auto-created by the DisaggregatedSet controller for every role with scaling.mode: External and are named "-". External autoscalers (HPA, KEDA, or any /scale-aware controller) write spec.replicas; the DisaggregatedSet controller reads it and drives the role's LeaderWorkerSet.
| Field | Description |
|---|---|
specDisaggregatedSetRoleScalerSpec | spec defines the desired state of DisaggregatedSetRoleScaler |
statusDisaggregatedSetRoleScalerStatus | status defines the observed state of DisaggregatedSetRoleScaler |
DisaggregatedSetRoleScalerSpec
Appears in:
DisaggregatedSetRoleScalerSpec is the desired state written by an external autoscaler via the /scale subresource. The (DS, role) association is derived from the scaler's controller ownerReference and its role label.
| Field | Description |
|---|---|
replicas [Required]int32 | Replicas is the desired replica count for the role. The controller seeds this at scaler creation — 1 for a fresh role (0 would deadlock vanilla HPA in ScalingDisabled), or the LWS's current replica count for a Static→External flip so the role does not silently drain to zero. External autoscalers overwrite it on their first tick. Non-pointer with a default because kube-apiserver's CRD /scale handler extracts .spec.replicas at read time and errors ("the spec replicas field does not exist") when the JSONPath resolves to nothing. HPA reads /scale before its first write; a missing field would deadlock the loop. |
DisaggregatedSetRoleScalerStatus
Appears in:
DisaggregatedSetRoleScalerStatus is the observed state written back by the DisaggregatedSet controller.
| Field | Description |
|---|---|
replicasint32 | Replicas is the observed replica count for this role — LWS groups (== leader pods), aggregated across all revisions currently present. Read by HPA as the "current" count for its ratio math. |
selectorstring | Selector is a label selector (in string form) matching one pod per LWS group (the leader), across all revisions: disaggregatedset.x-k8s.io/name=,disaggregatedset.x-k8s.io/role=,leaderworkerset.sigs.k8s.io/worker-index=0 Leader-only so HPA's per-pod-metric averaging divides by group count (matching spec.replicas that HPA writes), keeping the ratio math consistent for leaderWorkerTemplate.size > 1. Aggregate across revisions so HPA observes the serving fleet during a rolling update. |
observedGenerationint64 | ObservedGeneration is the .metadata.generation the status reflects. |
conditions[]k8s.io/apimachinery/pkg/apis/meta/v1.Condition | Conditions expose scaler-level state (Ready). |
DisaggregatedSetSpec
Appears in:
DisaggregatedSetSpec defines the desired state of DisaggregatedSet.
The all-or-nothing replicas rule (either every role has replicas > 0, or every role has replicas == 0) applies only to non-External roles. External roles are exempt because their effective replicas live outside the DS spec — they are driven via DisaggregatedSetRoleScaler.spec.replicas.
| Field | Description |
|---|---|
roles [Required][]DisaggregatedRoleSpec | Roles defines the list of roles (at least 2 required). Each role has a unique name and its own configuration. |
slicesint32 | Slices is the number of independent copies of the whole role topology. Each slice is a complete set of all roles that rolls out independently. Changing Slices scales copies up or down and does not trigger a rollout. |
placementPolicyPlacementPolicy | PlacementPolicy controls how a slice's roles are co-located and how the DisaggregatedSet's slices are spread across topology domains. When set, the controller injects pod affinity and anti-affinity into the managed LeaderWorkerSet pod templates. Placement is applied when a LeaderWorkerSet is created, so changing it takes effect on the next rollout. |
DisaggregatedSetStatus
Appears in:
DisaggregatedSetStatus defines the observed state of DisaggregatedSet.
| Field | Description |
|---|---|
roleStatuses[]RoleStatus | RoleStatuses contains the status for each role. The order matches spec.roles. |
conditions[]k8s.io/apimachinery/pkg/apis/meta/v1.Condition | conditions represent the current state of the DisaggregatedSet resource. Each condition has a unique type and reflects the status of a specific aspect of the resource. Standard condition types include:
The status of each condition is one of True, False, or Unknown. |
PlacementPolicy
Appears in:
PlacementPolicy controls topology placement of a DisaggregatedSet's slices.
| Field | Description |
|---|---|
typePlacementType | Type selects the placement guarantee. Defaults to None. |
topologystring | Topology is the node-label key that defines a domain, used as the affinity topologyKey. Required when Type is not None. |
PlacementType
(Alias of string)
Appears in:
PlacementType selects the DisaggregatedSet placement guarantee.
RoleScaling
Appears in:
RoleScaling configures how replicas are determined for a role. Sub-struct (not a bare enum) so future per-role scaling policies can be added without a v2 API bump.
| Field | Description |
|---|---|
modeRoleScalingMode | Mode controls the source of the replica count. Static (default) uses inline spec.replicas; External uses the auto-created scaler CR. |
RoleScalingMode
(Alias of string)
Appears in:
RoleScalingMode controls the source of the replica count for a role.
RoleStatus
Appears in:
RoleStatus defines the observed state of a single role.
| Field | Description |
|---|---|
name [Required]string | Name is the name of the role (matches spec.roles[].name). |
replicasint32 | Replicas is the total number of replicas for this role. |
readyReplicasint32 | ReadyReplicas is the number of ready replicas for this role. |
updatedReplicasint32 | UpdatedReplicas is the number of replicas updated to the latest revision. |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.