-
Notifications
You must be signed in to change notification settings - Fork 594
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
feat: Add the flag --secret-label-selector
to set the label selector for Secrets
to ingest.
#6795
Conversation
5fd9b46
to
4dee51b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6795 +/- ##
=======================================
+ Coverage 77.6% 77.7% +0.1%
=======================================
Files 207 207
Lines 24644 24679 +35
=======================================
+ Hits 19131 19197 +66
+ Misses 4528 4506 -22
+ Partials 985 976 -9 ☔ View full report in Codecov by Sentry. |
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.
Generally looks good, but it needs clearer explanation.
fbf6ae0
to
5cedcca
Compare
5cedcca
to
0597277
Compare
df86376
to
5bc641e
Compare
5bc641e
to
651d7d3
Compare
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.
Minor nits.
Please make sure to amend the PR title according to the recent changes in this PR.
--secret-label-selector
to set the label selector for Secrets
to ingest.
--secret-label-selector
to set the label selector for Secrets
to ingest.--secret-label-selector
to set the label selector for Secrets
to ingest.
d058779
to
6ea2518
Compare
…crets` to ingest. By setting this flag, the secrets that are ingested will be limited to those having this label set to "true". This can reduce the memory usage in scenarios with a large number of giant secrets. Co-authored-by: Patryk Małek <patryk.malek@konghq.com> Co-authored-by: Tao Yi <tao.yi@konghq.com> Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
6ea2518
to
86a54d6
Compare
What this PR does / why we need it:
As #6576 mentioned, we received a report about KIC's high memory usage.
We can reproduce this issue by the following steps:
Before this change:
KIC will consume over 1G of memory within the first 3-5 minutes, but after 10 minutes, KIC's memory consumption will stay around 400M.
With this change:
KIC will consume over 1G of memory within the first 3-5 minutes, but after 10 minutes, KIC's memory consumption will stay around 360M.
Which issue this PR fixes:
fixes: #6576
Special notes for your reviewer:
In this PR, I added a
--secret-label-for-caching
flag. Users can control whether KIC should cache it by specifying a label for the secret resources.This is achieved by setting a LabelSelectorPredicate.
Of course, as I mentioned earlier, this approach only alleviates some of the memory usage pressure. A more thorough way we have is not to cache, which will greatly increase the pressure on the API server.
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR