[SPARK-57106] Disallow watched namespace changes via dynamic config#692
[SPARK-57106] Disallow watched namespace changes via dynamic config#692dongjoon-hyun wants to merge 2 commits into
Conversation
d4842f1 to
36e7b98
Compare
peter-toth
left a comment
There was a problem hiding this comment.
LGTM, but do we need a config to trigger legacy behaviour or was it always unsafe?
|
It's always unsafe and the user needs to reinstall via Helm.
|
|
Thank you, @peter-toth and @viirya . |
@dongjoon-hyun Pls clarify what's unsafe. |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
There are some requests to keep the previous features because it's protected safely in the properly configured environments. I'm holding on this PR and trying to keep the existing features in a way.
What changes were proposed in this pull request?
Stop the dynamic-config reconciler from changing the operator's watched namespaces. The
namespaceUpdaterwiring is removed fromSparkOperatorConfigMapReconciler, and the now-orphanedupdateWatchingNamespacesmethod (andregisteredSparkControllersfield) are removed fromSparkOperator.watchedNamespacesis set once in the constructor from Helm values.Why are the changes needed?
A write to the dynamic-config ConfigMap could expand the operator's watched namespaces at runtime, widening its blast radius without a restart or RBAC change. Watched-namespace scope should be defined at deploy time only.
Does this PR introduce any user-facing change?
Yes. Changes to the watched-namespaces key in the dynamic-config ConfigMap are now ignored. Operators must be restarted with updated Helm values to change watched namespaces. Other dynamic-config keys are unchanged.
How was this patch tested?
Updated
SparkOperatorConfigMapReconcilerTestandSparkOperatorTest(removed the obsolete namespace-update test). Verified withgradle :spark-operator:test.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)