Skip to content

Commit a4c0571

Browse files
committed
fix(server): respect OPENSHELL_PODMAN_SOCKET env var in embedded driver
The env var was only wired up via clap in the standalone openshell-driver-podman binary. When the Podman driver runs embedded in the gateway, config came exclusively from TOML deserialization and the env var was never consulted. Apply it as a post-deserialization override, matching the existing OPENSHELL_K8S_WORKSPACE_DEFAULT_STORAGE_SIZE pattern. Closes #1446
1 parent bdaa08f commit a4c0571

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • crates/openshell-server/src

crates/openshell-server/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ use openshell_core::{ComputeDriverKind, Config, Error, Result};
4646
use std::collections::HashMap;
4747
use std::io::ErrorKind;
4848
use std::net::SocketAddr;
49+
use std::path::PathBuf;
4950
use std::sync::{Arc, Mutex};
5051
use std::time::Duration;
5152
use tokio::net::{TcpListener, TcpStream};
@@ -628,6 +629,9 @@ async fn build_compute_runtime(
628629
ComputeDriverKind::Podman => {
629630
let mut podman = podman_config_from_file(file)?;
630631
podman.gateway_port = config.bind_address.port();
632+
if let Ok(p) = std::env::var("OPENSHELL_PODMAN_SOCKET") {
633+
podman.socket_path = PathBuf::from(p);
634+
}
631635
apply_podman_local_tls_defaults(config, &mut podman)?;
632636

633637
ComputeRuntime::new_podman(

0 commit comments

Comments
 (0)