performance: use cached kube client for the infra runner#8764
performance: use cached kube client for the infra runner#8764jukie merged 23 commits intoenvoyproxy:mainfrom
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 <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
b93adac to
cc3962c
Compare
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
dda036c to
1b75784
Compare
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
|
@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".
|
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 <zhaohuabing@gmail.com> * fix rbac Signed-off-by: zhaohuabing <zhaohuabing@gmail.com> * address comments Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * inject provider kube client to infra runner Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * add retries for rate limit server Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * watch only EG owned resources Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * add release note Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * use context to pass the kube client Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * update release note Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * use config.server to pass the kube client Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * fix lint Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * address comments Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * update release note Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * minor wording Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * fix test Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * fix test Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * wait for the cached client and start ratlimit server first Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * fix gen Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * remove unnecessary change Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * fix rbac Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> * fix gen Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> --------- Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> Signed-off-by: zhaohuabing <zhaohuabing@gmail.com> Signed-off-by: Jake Oliver <jake@truelayer.com>
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.