sds: certificate hot-reload for xDS gRPC connection#10163
sds: certificate hot-reload for xDS gRPC connection#10163lizan merged 3 commits intoenvoyproxy:masterfrom
Conversation
|
I have added the new behavior to only inotify file watcher for Linux, but should this be added to kqueue watcher too - I guess the test case I added may fail on MacOS? Edit: yes it did. I'll arrange compilation environment on my macbook and fix it! |
dfc8b89 to
223fda7
Compare
|
After adding kqueue watcher implementation for macos, a different test case failed. I cannot find direct link between my change and the new failure. I see it occasionally failing on my machine too, ranging from 1 failure out of 1000 runs, to 3 out of 1000: This happens on master branch as well. |
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
I'd appreciate review comments on this PR, thank you! |
lizan
left a comment
There was a problem hiding this comment.
Sorry for the delay, I'm back from OOO.
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
Can you merge master? thanks |
Create watches for secrets pointed by path based SDS resources and trigger hot-reload when the files change. This allows rotation of TLS certificates and key for the xDS gRPC connection without restart. Signed-off-by: Tero Saarni <tero.saarni@est.tech>
|
I've rebased the PR. |
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
Sorry for the delay, can you merge master again? not rebase but just merge. |
Signed-off-by: Tero Saarni <tero.saarni@est.tech>
|
I merged but got some new errors with the CI https://dev.azure.com/cncf/envoy/_build/results?buildId=36546&view=logs&j=3bf5ec37-bb6f-5fb6-2cf1-5134dc6106d6&t=41d571fe-3811-578d-07de-68468f467dae&l=1567
|
|
@tsaarni I merged this ahead and will fix clang-tidy later. Thanks. |
|
I propose to:
Though I'm bit unsure if the 2) is the best place in the API documentation for this information - at least those are the places where it already mentions about filesystem subscriptions in general. I'm preparing documentation and will be submitting a PR soon for commenting. |
|
Thank you @tsaarni we can discuss the details in the PR! |
Adds documentation for envoyproxy#10163. Signed-off-by: Tero Saarni <tero.saarni@est.tech>
Adds documentation for #10163. Signed-off-by: Tero Saarni <tero.saarni@est.tech>
Create watches for secrets pointed by path based SDS resources and trigger
hot-reload when the files change. This allows rotation of TLS certificate
and key for the xDS gRPC connection without restart.
Signed-off-by: Tero Saarni tero.saarni@est.tech
Description:
This PR adds support for certificate rotation for xDS gRPC interface. The implementation approach has been discussed in #9359.
The PR consists of following parts:
WatcherImplto make subscriptions for directories instead of only files. The change is backwards compatible.The latter is needed to support commonly used pattern of updating files with atomic directory swap. Watching individual files is not possible, since in this pattern the files are symbolic links which point to a directory. The target of the symbolic links is a directory, which is atomically renamed (replaced) at update, not the files. Kubernetes uses this approach for secret volume mount. The details are covered in: #9359 (comment) and by the test case introduced in this PR.
The feature introduced by this PR is needed by Contour projectcontour/contour#2143 but it can be beneficial to any user of Envoy.
Risk Level: Medium
Testing: unittest
Docs Changes: To be defined: add information about the feature somewhere in the documentation
Release Notes:
Fixes #9359