swarm daemons: opt-in /healthz and /readyz listener, and /readyz on the controller
This commit is contained in:
parent
377bc1d5df
commit
c21b158884
1 changed files with 787 additions and 26 deletions
|
|
@ -117,6 +117,12 @@ async fn main() -> Result<()> {
|
|||
.with_ansi(false)
|
||||
.init();
|
||||
|
||||
let health = swarm_secret_client::health::Health::from_env(
|
||||
"SWARM_AUTHELIA_BRIDGE_HEALTH_ADDR",
|
||||
stop.clone(),
|
||||
)
|
||||
.await?;
|
||||
health.beat_on_runtime();
|
||||
let config = Config::from_env()?;
|
||||
let socket = config.socket.clone();
|
||||
let state = Arc::new(AppState {
|
||||
|
|
@ -131,6 +137,7 @@ async fn main() -> Result<()> {
|
|||
|
||||
let listener = bind_socket(&socket)?;
|
||||
tracing::info!(socket = %socket.display(), "swarm-authelia-bridge listening");
|
||||
health.ready_when(|| true);
|
||||
serve(listener, app, stop).await
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue