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

   ### What changes were proposed in this pull request?
   
   This PR aims to fix the Spark workload `ClusterRole` and `Role`s to allow 
the `Spark` driver to create `Deployment`s and to scale executors. The existing 
`statefulsets` rule is unchanged.
   
   | Resource in `apps` API group | Before | After |
   | --- | --- | --- |
   | `deployments` | None | `get`, `create`, `delete` |
   | `statefulsets/scale` | None | `get`, `update` |
   | `deployments/scale` | None | `get`, `update` |
   
   ### Why are the changes needed?
   
   Apache Spark [v4.2.0](https://github.com/apache/spark/releases/tag/v4.2.0) 
(2026-07-11) added the `deployment` pods allocator (SPARK-54173), which 
`examples/pi-java25-deployment.yaml` uses. Currently, its driver fails to start.
   
   ```
   deployments.apps is forbidden: User "system:serviceaccount:default:spark" 
cannot create resource "deployments" in API group "apps" in the namespace 
"default".
   ```
   
   In addition, both `statefulset` and `deployment` allocators scale executors 
through the `scale` subresource. RBAC does not cover a subresource with a grant 
on the resource itself, so the driver also fails to start with dynamic 
allocation.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The workload roles grant more permissions than 
[1.0.0](https://github.com/apache/spark-kubernetes-operator/releases/tag/1.0.0) 
(2026-07-23). The migration guide is updated.
   
   ### How was this patch tested?
   
   Pass the CIs with the updated `helm test`. I also verified manually on 
Minikube with Apache Spark 4.2.0. Both `examples/pi-java25-deployment.yaml` and 
`examples/pi-statefulset.yaml` with dynamic allocation fail without this PR and 
succeed with it.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 5.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