-
Notifications
You must be signed in to change notification settings - Fork 48
[SPARK-52755] Remove ConfigMap informer from config reconciler
#281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ConfigMap informer from config reconciler
ConfigMap informer from config reconcilerConfigMap informer from config reconciler
|
@jiangzho @dongjoon-hyun This PR introduces Thank you! |
...src/test/java/org/apache/spark/k8s/operator/config/SparkOperatorConfigMapReconcilerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this PR assume that the created K8s Operator ConfigMap is immutable, @csviri ?
I'm wondering if it's okay with DYNAMIC_CONFIG_SELECTOR.
Although Apache Spark generates immutable ConfigMaps, Spark K8s Operator is different, isn't it?
|
Could you review this PR, @jiangzho ? |
|
Just wanna make sure I understand this - @csviri - with this patch, the config reconciler is still reconciling the config map with fixed interval. It's just not triggered by config map update events, is my understanding correct ? But without informer, how may we ensure the resource is up-to-date at each reconciliation ? Is the cache refreshed under the hood ? |
|
To clarify the behavior of this reconciler; this way every
From the controller's perspective, this is transparent, if a config map won't change it won't trigger the reconciliation. If someone adds an annotation to an immutable ConfigMap, that might still trigger the reconciliation - in that sense, it is not aware of immutable ConfigMaps. Probably should not be, maybe just the reconciler implementation should be idempotent in this regard.
It is triggered by configMap update events.
For a primary resource, there is an implicit informer in the background, that caches the changes and triggers the reconciliation. (This is more explicit for
This is a bit tricky, since if everything works correctly, there is no need for a fixed interval reconciliation. Unless the reconciler implementation requires it. In JOSDK in general there is a "failsafe" fixed reconiliation for every primary resource, with a relatively high interval (10 hours), see in The interval can be changed, but also turned off. |
|
Thank you for the details. Can we have some numbers for this claim, @csviri ?
|
|
Also, cc @peter-toth |
Unfortunately, I don't have any at hand now.
Will work on the number within JOSDK in close future. cc @shawkins do you happen to have some numbers / metrics regarding informers? thank you |
Not that I recall. Memory footprint is usually the number one concern - it of course varies with the number of resources watched and the size of them. Cluster scoped watching of secrets or configmaps would commonly be the most problematic. The next most frequent concern with the older fabric8s using okhttp was an exhaustion of concurrent requests - that has since been fixed. I'm not sure what the server-side limit is on the number of concurrent watches / websockets. |
|
Could you check the CI failure, @csviri ? |
sure will do |
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
01ff6e6 to
74502e4
Compare
What changes were proposed in this pull request?
PR removes unnecessary informer for the configuration
SparkOperatorConfigMapReconciler.It adds a sanity test using
KubeApiTest.Why are the changes needed?
Having additional informer might effect performance, memory consumption, also maintains an additiona websocket connection to Kubernetes API.
Does this PR introduce any user-facing change?
No, but introduces new way of testing.
How was this patch tested?
With an integration test.
Was this patch authored or co-authored using generative AI tooling?
No