dongjoon-hyun opened a new pull request, #864:
URL: https://github.com/apache/spark-kubernetes-operator/pull/864

   ### What changes were proposed in this pull request?
   
   Apply the `nodeLabels` and the `tolerations` of the Kueue `ResourceFlavor`s 
which an admitted
   `Workload` was assigned to the pods the operator creates for it, like Kueue 
built-in integrations
   do in `podset.FromAssignment` and `podset.Merge` (Kueue v0.19.4). This wires 
up
   `KueueWorkloadUtils.resolvePodSetFlavors`, which SPARK-59654 added without a 
caller.
   
   `holdForAdmission` resolves the flavors and hands them to the context through
   `BaseContext.setKueuePodSetFlavors`, which applies them where each role gets 
its pods from.
   
   | Resource | Where the flavors are applied |
   |---|---|
   | `SparkCluster` | The master and worker `StatefulSet` pod templates, in 
place |
   | `SparkApplication` | The driver and executor pod templates of a copy of 
the resource, since the driver creates the executors. The copy keeps the pod 
sets of the `Workload`, and their hash, unchanged |
   
   | Case | Behavior |
   |---|---|
   | The driver or the master exists already | The flavors are resolved again, 
since rebuilding the resources without them would remove what server-side apply 
owns |
   | A node label conflicts with the node selector of the pods | Permanent, 
like `ErrInvalidPodSetUpdate` in Kueue: the quota is released and the resource 
fails with `SchedulingFailure`. A failed release is retried rather than 
reported |
   | The `ResourceFlavor`s cannot be read | The resource is held and the read 
is retried with the new `KueueResourceFlavorReadFailed` warning, rather than 
applying no flavors |
   | The flavors carry neither node labels nor tolerations | Left out, so the 
stock `default-flavor` costs nothing |
   
   Topology Aware Scheduling and the `podSetUpdates` of admission checks remain 
out of scope.
   
   ### Why are the changes needed?
   
   A `ResourceFlavor` usually stands for a node group, and applying Kueue's 
assignment to the pods is
   the job of the integration. Without it the operator charges the quota of one 
node group while the
   pods land on another, pods admitted to a tainted node group stay `Pending` 
while holding that
   quota, and flavor fungibility does not work for Spark resources.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, Kueue feature is not released yet.
   
   ### How was this patch tested?
   
   Pass the CIs.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to