feat: make k8Secrets auth provider secret cache TTL configurable#2581
Open
ramasai1 wants to merge 2 commits into
Open
feat: make k8Secrets auth provider secret cache TTL configurable#2581ramasai1 wants to merge 2 commits into
ramasai1 wants to merge 2 commits into
Conversation
Signed-off-by: Ramasai Venkatsitarambhaskar Tadepalli <ramasai.tadepalli@mongodb.com>
d73e3b4 to
b6c8568
Compare
fseldow
reviewed
Jun 12, 2026
| } | ||
|
|
||
| func (d *k8SecretAuthProvider) getSecretTimeout() time.Duration { | ||
| if d.config.SecretTimeout == 0 { |
Contributor
There was a problem hiding this comment.
it might be confusing when secretTimeout is mually set as 0. User may expect to disable cache however currrent logic will fallback to default 12h
What about set secretTimeout as one pointer?
Then
if config.SecretTimeout == nil -> return defaultSecretTimeout
Author
There was a problem hiding this comment.
@fseldow Thank you for your review, I have made the requested changes.
fseldow
suggested changes
Jun 12, 2026
Signed-off-by: Ramasai Venkatsitarambhaskar Tadepalli <ramasai.tadepalli@mongodb.com>
13e70b2 to
6128881
Compare
fseldow
reviewed
Jun 15, 2026
| Name string `json:"name"` | ||
| ServiceAccountName string `json:"serviceAccountName,omitempty"` | ||
| Secrets []secretConfig `json:"secrets,omitempty"` | ||
| SecretTimeout uint32 `json:"secretTimeout,omitempty"` |
Contributor
There was a problem hiding this comment.
may forget to update in readme
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Make the cache TTL for k8Secrets provider configurable.
Which issue(s) does this PR resolve?
Fixes #2580
Type of change
mainbranch)Testing and verification
Unit tests.
Checklist
Post merge requirements
Helm Chart Change