performance: use cached kube client for the infra runner#8764
Conversation
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a105d0adde
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88c09aedc4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8764 +/- ##
==========================================
- Coverage 74.39% 74.33% -0.07%
==========================================
Files 246 246
Lines 39221 39287 +66
==========================================
+ Hits 29180 29205 +25
- Misses 8017 8048 +31
- Partials 2024 2034 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b61799a to
97c2e50
Compare
cdb0581 to
4025657
Compare
4025657 to
b8db1ff
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8db1ff9a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
nice :) |
5f162ef to
8821341
Compare
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
b93adac to
cc3962c
Compare
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
dda036c to
1b75784
Compare
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b7f968d16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
Signed-off-by: Huabing (Robin) Zhao <[email protected]>
|
LGTM, thanks! |
| go func() { | ||
| errChan <- p.manager.Start(ctx) | ||
| }() | ||
| go signalProviderReady(ctx, p.manager.GetCache().WaitForCacheSync, p.providerReady) |
There was a problem hiding this comment.
why is this needed ? dont we already perform something similar in health check and readiness checks ?
There was a problem hiding this comment.
This ensures the controller client is ready before initializing the rate limit server in the infra manager.
…8764) * use cached client from the controller manager Signed-off-by: Huabing (Robin) Zhao <[email protected]> * fix rbac Signed-off-by: zhaohuabing <[email protected]> * address comments Signed-off-by: Huabing (Robin) Zhao <[email protected]> * inject provider kube client to infra runner Signed-off-by: Huabing (Robin) Zhao <[email protected]> * add retries for rate limit server Signed-off-by: Huabing (Robin) Zhao <[email protected]> * watch only EG owned resources Signed-off-by: Huabing (Robin) Zhao <[email protected]> * add release note Signed-off-by: Huabing (Robin) Zhao <[email protected]> * use context to pass the kube client Signed-off-by: Huabing (Robin) Zhao <[email protected]> * update release note Signed-off-by: Huabing (Robin) Zhao <[email protected]> * use config.server to pass the kube client Signed-off-by: Huabing (Robin) Zhao <[email protected]> * fix lint Signed-off-by: Huabing (Robin) Zhao <[email protected]> * address comments Signed-off-by: Huabing (Robin) Zhao <[email protected]> * update release note Signed-off-by: Huabing (Robin) Zhao <[email protected]> * minor wording Signed-off-by: Huabing (Robin) Zhao <[email protected]> * fix test Signed-off-by: Huabing (Robin) Zhao <[email protected]> * fix test Signed-off-by: Huabing (Robin) Zhao <[email protected]> * wait for the cached client and start ratlimit server first Signed-off-by: Huabing (Robin) Zhao <[email protected]> * fix gen Signed-off-by: Huabing (Robin) Zhao <[email protected]> * remove unnecessary change Signed-off-by: Huabing (Robin) Zhao <[email protected]> * fix rbac Signed-off-by: Huabing (Robin) Zhao <[email protected]> * fix gen Signed-off-by: Huabing (Robin) Zhao <[email protected]> --------- Signed-off-by: Huabing (Robin) Zhao <[email protected]> Signed-off-by: zhaohuabing <[email protected]> Signed-off-by: Jake Oliver <[email protected]>
This PR reuses the cached controller-runtime client from the controller manager for infrastructure reconciliation to reduce Kubernetes API server calls.
Please note that the rate limit server is now created only after the firstGatewayis created. This is because the cached Kubernetes client in the kube provider is initialized asynchronously and may not be ready when the server starts.The infra runner waits for the kube client to finish cache sync before creating the rate limit server.
The changed behavior of the Infra runner are covered by existing e2e tests test/e2e/tests/envoyproxy.go.
Release note: yes.