-
Notifications
You must be signed in to change notification settings - Fork 194
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: Enable multiple token caching and add option to disable caching… #660
feat: Enable multiple token caching and add option to disable caching… #660
Conversation
… completely Signed-off-by: sbene <sebastien.bene@ubisoft.com>
404604c
to
3a27b24
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #660 +/- ##
==========================================
+ Coverage 72.16% 72.91% +0.74%
==========================================
Files 26 26
Lines 1994 1606 -388
==========================================
- Hits 1439 1171 -268
+ Misses 458 326 -132
- Partials 97 109 +12 ☔ View full report in Codecov by Sentry. |
Can't wait to see this merged soon! |
@DaThumpingRabbit Just a question, does this improve the performance of the plugin? We are experiencing issues in our vault using approle method and vault seals itself. We have around 500 apps using this plugin via Argo. And we see millions of info logs shown below. Wondering if token caching would help here.
|
@sabinayakc It should definitely improve performance as you will contact the vault instance less (as long as there is a valid token for the auth method you are using, it will be used instead of performing a new login) However, it will also depend on your configuration, if you have one approle per app (taking an extreme use case) with a very short TTL, it will do nothing for you (please note that this PR is not available in any current release of the plugin for now, cf #666) |
Description
Due to the previous PR #544 fixing the cache behavior, users are not able to use multiple credentials anymore with the same AVP
This new PR's goal is to fix that issue by adding the following features
Fixes: #658
Checklist
Please make sure that your PR fulfills the following requirements:
go mod tidy -compat=1.21
to ensure only the minimum is pulled in.Type of Change