MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / set_user_namespaces

Function set_user_namespaces

e2e/rust/tests/user_namespaces.rs:43–64  ·  view source on GitHub ↗
(enable: bool)

Source from the content-addressed store, hash-verified

41}
42
43async fn set_user_namespaces(enable: bool) -> Result<(), String> {
44 let env_arg = if enable {
45 "OPENSHELL_ENABLE_USER_NAMESPACES=true"
46 } else {
47 "OPENSHELL_ENABLE_USER_NAMESPACES-"
48 };
49
50 kubectl(&[
51 "set", "env", "statefulset/openshell",
52 "-n", "openshell", env_arg,
53 ]).await?;
54
55 kubectl(&[
56 "rollout", "status", "statefulset/openshell",
57 "-n", "openshell", "--timeout=120s",
58 ]).await?;
59
60 // Give the gateway time to fully initialize after rollout.
61 tokio::time::sleep(Duration::from_secs(5)).await;
62
63 Ok(())
64}
65
66async fn delete_sandbox(name: &str) {
67 let _ = kubectl(&["delete", "sandbox", name, "-n", "openshell"]).await;

Calls 1

kubectlFunction · 0.85

Tested by

no test coverage detected