diff options
author | Alex <alex@adnab.me> | 2023-02-06 14:18:58 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-02-06 14:18:58 +0000 |
commit | d14678e0ac4511156d651cd1f5bf05474e92b6bb (patch) | |
tree | d68053ff8b09592dfa30345027888235e90c6b67 /src/garage/server.rs | |
parent | fba8224cf00f7c542150e48a88c22025ff03b948 (diff) | |
parent | 80e232699825c5c512e8714e08b6a80992a06498 (diff) | |
download | garage-d14678e0ac4511156d651cd1f5bf05474e92b6bb.tar.gz garage-d14678e0ac4511156d651cd1f5bf05474e92b6bb.zip |
Merge pull request 'Secrets can be passed directly in config, as file, or as env' (#499) from config-files-env into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/499
Diffstat (limited to 'src/garage/server.rs')
-rw-r--r-- | src/garage/server.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/garage/server.rs b/src/garage/server.rs index 16f1b625..958089c6 100644 --- a/src/garage/server.rs +++ b/src/garage/server.rs @@ -17,6 +17,7 @@ use garage_api::k2v::api_server::K2VApiServer; use crate::admin::*; #[cfg(feature = "telemetry-otlp")] use crate::tracing_setup::*; +use crate::{fill_secrets, Secrets}; async fn wait_from(mut chan: watch::Receiver<bool>) { while !*chan.borrow() { @@ -26,9 +27,9 @@ async fn wait_from(mut chan: watch::Receiver<bool>) { } } -pub async fn run_server(config_file: PathBuf) -> Result<(), Error> { +pub async fn run_server(config_file: PathBuf, secrets: Secrets) -> Result<(), Error> { info!("Loading configuration..."); - let config = read_config(config_file)?; + let config = fill_secrets(read_config(config_file)?, secrets); // ---- Initialize Garage internals ---- |