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

   ### What changes were proposed in this pull request?
   
   This PR introduces `KueueWorkloadFactory` and unit tests in the 
`spark-operator` module to construct Kueue `Workload` 
(`kueue.x-k8s.io/v1beta1`) resources from Spark custom resources:
   
   | Custom Resource | PodSet Name | Count (`count`) | Min Count (`minCount`) | 
Resource Calculation |
   | :--- | :--- | :--- | :--- | :--- |
   | **`SparkApplication`** | `driver` | 1 | - | CPU, Memory (+ overheads, 
off-heap, PySpark), GPU |
   | **`SparkApplication`** | `executor` | Instances / Max | Min (Dynamic 
Allocation) | CPU, Memory (+ overheads), GPU |
   | **`SparkCluster`** | `master` | StatefulSet Replicas | - | Master 
StatefulSet PodTemplate |
   | **`SparkCluster`** | `worker` | StatefulSet Replicas / HPA Max | HPA Min 
(if configured) | Worker StatefulSet PodTemplate |
   
   - **Common Features**: Links OwnerReference, sets `queueName` from label, 
and syncs `active = !spec.isSuspend()`.
   - **Unit Tests** (`KueueWorkloadFactoryTest`): Verifies resource 
calculations, dynamic allocation/HPA bounds, and suspend status for both 
resources.
   
   ### Why are the changes needed?
   
   Following the introduction of Kueue v1beta1 CRD models in 
[SPARK-59486](https://github.com/apache/spark-kubernetes-operator/pull/822), 
this PR adds the resource calculation and workload construction logic for both 
`SparkApplication` and `SparkCluster` as a modular, reviewable step.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Pass the CIs.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Antigravity (Gemini 3.8 Flash)


-- 
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