From 247291083e1622f4b6bdb196988a36adcc085bc9 Mon Sep 17 00:00:00 2001 From: greg Date: Tue, 7 May 2024 19:53:22 +0000 Subject: [PATCH] add rpc services --- src/main.rs | 9 ++++++++- src/startup_scripts.rs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index d8dec81..2f329a3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -687,7 +687,14 @@ async fn main() -> Result<(), Box> { kub_controller .deploy_replicas_set(rpc_node.replica_set()) .await?; - info!("rpc replica set ({rpc_index}) deployed successfully"); + info!("rpc node replica set ({rpc_index}) deployed successfully"); + + let rpc_service = kub_controller.create_service( + &format!("rpc-node-selector-{rpc_index}"), + rpc_node.service_labels(), + ); + kub_controller.deploy_service(&rpc_service).await?; + info!("rpc node service ({rpc_index}) deployed successfully"); } } diff --git a/src/startup_scripts.rs b/src/startup_scripts.rs index 2c918b4..945a637 100644 --- a/src/startup_scripts.rs +++ b/src/startup_scripts.rs @@ -925,7 +925,7 @@ while true; do while true; do if [[ -z $pid ]] || ! kill -0 "$pid"; then - echo "\############## non voting validator exited, restarting ##############" + echo "\############## rpc node validator exited, restarting ##############" break fi sleep 1