-
Notifications
You must be signed in to change notification settings - Fork 425
feat: reloadable tls client config #7230
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
base: main
Are you sure you want to change the base?
feat: reloadable tls client config #7230
Conversation
caf3366 to
cfcf157
Compare
| pub fn maybe_watch_server_tls_config( | ||
| tls_server_config: Arc<ReloadableTlsServerConfig>, | ||
| ) -> Result<()> { | ||
| common_grpc::reloadable_tls::maybe_watch_tls_config(tls_server_config, || {}).map_err(|e| { |
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.
If server TLS config is changed, do we need to proactively close all connected client channels?
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.
The newly request would be served using the new TLS config in MySQL and PG, but the connected/alive connection stays unaffected. What do you think, should we actively close the connection to force refresh TLS change? @sunng87
| info!("Spawning background task for watching TLS cert/key file changes"); | ||
| std::thread::spawn(move || { | ||
| let _watcher = watcher; | ||
| while let Ok(res) = rx.recv() { |
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.
nit: Should we ignore the error here? Or add log
Signed-off-by: shuiyisong <[email protected]>
Signed-off-by: shuiyisong <[email protected]>
Signed-off-by: shuiyisong <[email protected]>
Signed-off-by: shuiyisong <[email protected]>
Signed-off-by: shuiyisong <[email protected]>
Signed-off-by: shuiyisong <[email protected]>
Signed-off-by: shuiyisong <[email protected]>
Signed-off-by: shuiyisong <[email protected]>
Signed-off-by: shuiyisong <[email protected]>
bfdaeda to
1e60e34
Compare
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
This patch introduces the ability for
channel_managerto use a re-loadable client TLS config to automatically reload the TLS files when changed.The
ReloadableTlsServerConfigis now extracted intoreloadable_tlsfor reuse.PR Checklist
Please convert it to a draft if some of the following conditions are not met.