feat(controller): allow Spark 4.2 NetworkPolicy creation #3240
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 336 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.348
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3240"
general
weight: 0.35
vjanelle
Purpose of this PR
Adds the controller RBAC required for Spark 4.2's default Kubernetes NetworkPolicy behavior.
This is a prerequisite for the Spark 4.2 migration discussed in #3218.
Proposed changes:
createandpatchnetworkpolicies.networking.k8s.io.Change Category
Rationale
Spark 4.2 configures a Kubernetes
NetworkPolicyby default so that executor pods only accept ingress traffic from the driver and peer executors in the same job.This behavior is documented in the Apache Spark 4.2 Core migration guide.
I reproduced this using an Apache Spark 4.2 controller runtime.
With only
patchpermission, submission failed because Kubernetes also requiredcreatefor the server-side apply operation:After granting only
createandpatch:COMPLETEDNo broader NetworkPolicy permissions are added because they were not required by the tested Spark 4.2 submission path.
Checklist
Additional Notes
Local validation completed successfully:
make helm-unittest- 246/246 tests passedmake kustomize-lint- passedmake drift-check- passedmake go-fmt- passedmake go-vet- passedmake go-lint- 0 issuesmake unit-test- passedgo mod tidy- no changesgo -C test/e2e mod tidy- no changesNo documentation changes are included in this prerequisite RBAC PR. User-facing Spark 4.2 migration and compatibility documentation can be handled together with the follow-up Spark 4.2 runtime update tracked in #3218.
Part of #3218.