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

   ### What changes were proposed in this pull request?
   
   This PR aims to narrow the Helm RBAC verbs for `events` to `get`, `create` 
and `patch`. It moves `events` from the shared core API group rule into its own 
rule, and it updates `helm test` to match.
   
   | Resource | Before | After |
   | --- | --- | --- |
   | `events` | `get`, `list`, `watch`, `create`, `update`, `patch`, `delete` | 
`get`, `create`, `patch` |
   
   ### Why are the changes needed?
   
   The operator writes K8s events only through JOSDK's `DefaultEventSink` 
(SPARK-59502, SPARK-59576). That class calls only `get`, `create` and `patch` 
on events, so the other verbs are not needed.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The operator's `ClusterRole` and `Role`s no longer grant `list`, 
`watch`, `update` or `delete` on `events`. The operator never uses these verbs 
on `events`, so its behavior does not change.
   
   ### How was this patch tested?
   
   Pass the CIs with the updated `helm test`. I also checked the verbs 
manually, using a user bound only to `spark-operator-clusterrole`.
   
   | Verb on `events` | `kubectl auth can-i` |
   | --- | --- |
   | `get`, `create`, `patch` | yes |
   | `list`, `watch`, `update`, `delete` | no |
   
   ### 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