Skip to content

feature: use watch instead of client get in Reconciler #452

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

Merged
merged 1 commit into from
Jul 6, 2025

Conversation

googs1025
Copy link
Member

@googs1025 googs1025 commented Jun 12, 2025

What this PR does / why we need it

Which issue(s) this PR fixes

Fixes #431 (comment)

Special notes for your reviewer

Does this PR introduce a user-facing change?

None

@InftyAI-Agent InftyAI-Agent added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Jun 12, 2025
@googs1025 googs1025 marked this pull request as draft June 12, 2025 14:43
@googs1025 googs1025 force-pushed the feature/configmaps_watch branch from 717b0f5 to 2a2a44b Compare June 12, 2025 14:47
@googs1025
Copy link
Member Author

wait for : #443
then I will test

@googs1025 googs1025 force-pushed the feature/configmaps_watch branch 4 times, most recently from d7f70e4 to 957a98a Compare July 3, 2025 05:34
@googs1025 googs1025 force-pushed the feature/configmaps_watch branch from 957a98a to fa5ab4b Compare July 3, 2025 05:35
@@ -160,9 +161,39 @@ func (r *ServiceReconciler) SetupWithManager(mgr ctrl.Manager) error {
return !reflect.DeepEqual(oldBar.Status, newBar.Status)
},
})).
Watches(&corev1.ConfigMap{}, handler.EnqueueRequestsFromMapFunc(r.updateGlobalConfig),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use watch instead of getting configmap every loop, which reduces calls to the api-server.

@googs1025 googs1025 marked this pull request as ready for review July 3, 2025 06:06
@kerthcet
Copy link
Member

kerthcet commented Jul 4, 2025

will review tonight.

@kerthcet
Copy link
Member

kerthcet commented Jul 6, 2025

/lgtm
/approve
/kind feature

Thanks!

@InftyAI-Agent InftyAI-Agent added lgtm Looks good to me, indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. feature Categorizes issue or PR as related to a new feature. and removed do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Jul 6, 2025
@InftyAI-Agent InftyAI-Agent merged commit bc1cea5 into InftyAI:main Jul 6, 2025
27 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. feature Categorizes issue or PR as related to a new feature. lgtm Looks good to me, indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants