Implement a cert watcher to use new certificates without restarting - #196
Conversation
|
Welcome @black-dragon74! |
|
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. |
1d3e145 to
b830c49
Compare
|
/assign |
|
Integration tests are failing because readinessProbe for csi-snapshot-metadata sidecar is failing. |
|
fyi kubernetes-csi/csi-driver-host-path#624 merged with v0.2.0 release which does not contain the http health probe from #190 . |
https://github.com/kubernetes-csi/external-snapshot-metadata/actions/runs/20814019470/job/60361307710?pr=196 |
This patch adds a certificate watcher that hot reloads any certificate updates. This enhancement prevents the need to restart the sidecar to load the new certificates. Signed-off-by: Niraj Yadav <niryadav@redhat.com>
Signed-off-by: Niraj Yadav <niryadav@redhat.com>
b830c49 to
fe2ed77
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: black-dragon74, Rakshith-R The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR implements a
CertWatcherwhich is responsible for watching the TLS Cert and Key files.It also sets a callback
GetCertificatewhich if set in the gRPC TLS opts, will be called every time a certificate data is required, enabling hot reloads and removing the requirement to restart the sidecar.Which issue(s) this PR fixes:
Fixes #152
Special notes for your reviewer:
NONE
Does this PR introduce a user-facing change?: