- removed: api-service

- removed: session-service
- updated: moved health check out of consul registration
- updated: get service info to pull the service from the default namespace for the service account
- updated: the rest of the services to be able to handle the new database tables
This commit is contained in:
2025-03-20 22:53:49 -04:00
parent b9ebdd7080
commit 4046f56191
60 changed files with 233 additions and 30588 deletions

View File

@@ -21,7 +21,7 @@ use tokio::{select, signal};
use tracing::Level;
use tracing::{debug, error, info, warn};
use tracing_subscriber::EnvFilter;
use utils::{consul_registration, logging};
use utils::{health_check, logging};
use utils::service_discovery::{get_kube_service_endpoints_by_dns};
use warp::Filter;
@@ -60,7 +60,7 @@ const MAX_CONCURRENT_CONNECTIONS: usize = 100;
async fn main() -> Result<(), Box<dyn std::error::Error>> {
dotenv().ok();
let app_name = env!("CARGO_PKG_NAME");
logging::setup_logging(app_name);
logging::setup_logging(app_name, &["packet_service", "health_check"]);
// Set the gRPC server address
let addr = env::var("LISTEN_ADDR").unwrap_or_else(|_| "0.0.0.0".to_string());
@@ -70,7 +70,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let character_url = format!("http://{}",get_kube_service_endpoints_by_dns("character-service","tcp","character-service").await?.get(0).unwrap());
// Start health-check endpoint
consul_registration::start_health_check(addr.as_str()).await?;
health_check::start_health_check(addr.as_str()).await?;
let auth_client = Arc::new(Mutex::new(AuthClient::connect(&auth_url).await?));
let character_client = Arc::new(Mutex::new(CharacterClient::connect(&character_url).await?));