webhook: enhance certwatcher for atomicity and serialization#1360
webhook: enhance certwatcher for atomicity and serialization#1360black-dragon74 wants to merge 1 commit intokubernetes-csi:masterfrom
Conversation
This patch includes a set of enhancements to the certwatcher, being: - Use `sync.RWMutex` to avoid serialization bottlenecks - Watch the parent directory instead of the actual files (fsnotify watches inodes). - This takes care of the atomic writes by editors such as `vi`. Signed-off-by: Niraj Yadav <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: black-dragon74 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @black-dragon74. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
|
@black-dragon74: Cannot trigger testing until a trusted user reviews the PR and leaves an DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
|
/ok-to-test |
|
/assign @xing-yang |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This patch includes a set of enhancements to the certwatcher, being:
sync.RWMutexto avoid serialization bottlenecksviwhich rename a temp file instead of writing to it.ReadCertificateprivate as it will always be called internally.Special notes for your reviewer:
NA
Does this PR introduce a user-facing change?: