@@ -115,8 +115,12 @@ type LauncherPoolForNodeType struct {
115115 // +required
116116 EnhancedNodeSelector EnhancedNodeSelector `json:"enhancedNodeSelector"`
117117
118- // PerAcceleratorCount defines pre-configuration quantities for each accelerator type
119- PerAcceleratorCount []PerAcceleratorCount `json:"perAcceleratorCount"`
118+ // CountForLauncher defines pre-configuration quantities for each LauncherConfig
119+ // to maintain on each matching node. Each entry may optionally include
120+ // an AcceleratorSelector to restrict the entry to nodes that have a
121+ // matching accelerator (if omitted, apply regardless of accelerator sets).
122+ // +required
123+ CountForLauncher []CountForLauncher `json:"countForLauncher"`
120124}
121125
122126// EnhancedNodeSelector defines node selector with label selector and resource requirements.
@@ -127,23 +131,27 @@ type EnhancedNodeSelector struct {
127131 // ResourceRequirements defines the resource requirements for a node.
128132 // +optional
129133 ResourceRequirements * ResourceRequirements `json:"resourceRequirements,omitempty"`
130- // AcceleratorSelector defines accelerator-specific selection criteria
134+ // AcceleratorSelector defines accelerator-specific selection criteria at the
135+ // node level. When omitted, node matching does not filter based on accelerator
136+ // (convenient for homogeneous clusters).
137+ // +optional
131138 AcceleratorSelector * AcceleratorSelector `json:"acceleratorSelector,omitempty"`
132139}
133140
134- // PerAcceleratorCount defines configuration for specific accelerators
135- type PerAcceleratorCount struct {
136- // AcceleratorType specifies accelerator type (e.g., nvidia.com/gpu)
137- AcceleratorType string `json:"acceleratorType,omitempty"`
138-
139- // CountForLauncher is the total number of launcher for each LauncherConfig
140- // to maintain on each matching node per accelerator.
141- // If two different counts are specified for the same (Node, Accelerator, LauncherConfig),
142- // the higher count is used and will be populated into LauncherPoolPolicyStatus.
143- // If no CountForLauncher applies to a given (Node, Accelerator, LauncherConfig), this Node
144- // will be ignored for this LauncherConfig.
141+ type CountForLauncher struct {
142+ // LauncherConfigName is the name of the LauncherConfig this policy applies to.
145143 // +required
146- CountForLauncher []CountForLauncher `json:"countForLauncher"`
144+ LauncherConfigName string `json:"launcherConfigName"`
145+
146+ // LauncherCount is the total number of launcher pods to maintain.
147+ // +required
148+ LauncherCount int32 `json:"launcherCount"`
149+
150+ // Apply this count only to accelerators on the node that
151+ // match this selector. When omitted, the count applies to the node regardless
152+ // of accelerator sets (convenient for homogeneous clusters).
153+ // +optional
154+ AcceleratorSelector * AcceleratorSelector `json:"acceleratorSelector,omitempty"`
147155}
148156
149157// ResourceRequirements defines resource requirements for a node.
@@ -191,16 +199,6 @@ type AcceleratorSelector struct {
191199 Count * int32 `json:"count,omitempty"`
192200}
193201
194- type CountForLauncher struct {
195- // LauncherConfigName is the name of the LauncherConfig this policy applies to.
196- // +required
197- LauncherConfigName string `json:"launcherConfigName"`
198-
199- // LauncherCount is the total number of launcher pods to maintain.
200- // +required
201- LauncherCount int32 `json:"launcherCount"`
202- }
203-
204202type LauncherPoolPolicyStatus struct {
205203 // `observedGeneration` is the `metadata.generation` last seen by the controller.
206204 // +optional
0 commit comments