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.
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
Add ability to reload client certificates from disk #79083
Add ability to reload client certificates from disk #79083
Changes from all commits
929b155
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Why was the default chosen so high? The IO and CPU load would surely withstand a more responsive default like 15s / 30s. If I change a cert that is live reloaded I'd expect it to manifest way sooner then 5 minutes.
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.
I thought colliding names produced errors.
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.
I don't think so, looking at the code the metrics will get shared if there are multiple queues with the same name
I could be wrong!
We could try to add the cert file names here, but technically we don't know them and there may be a GetCert function in which case we don't really have any kind of identifier beyond a pointer
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.
Name is only used for metrics AFAIK. Multiple queue's with same name just get aggreted in queue metrics which isn't terrible. Nit: traditionally the names have been lower snake case, but I see we've diverged on that convention for some of the other cert stuff.
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.
these lines introduced non-verbose output to
kubectl auth
:potentially breaking consumers of CombinedOutput looking for just "yes".
unless there are immediate objections i'm going to send a PR to
.V(1)
the log messages.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.
Definitely. I'd probably call it v3
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.
Using a regular Mutex would make this a lot simpler.:
Given this is only required on connection initiation, I doubt there'll be significant benifit from using a RWMutex here. Unlocks that aren't guarded to the scope by defers will deadlock if anything panics in the function you are calling (which has happened before in Go cert parsing).