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

Function inheritable_keys

crates/openshell-server/src/config_file.rs:258–295  ·  view source on GitHub ↗

Inheritance allowlist (the Q4 "high-overlap set"). Each driver opts in to a specific subset so a gateway-wide default does not accidentally land in a driver table that does not understand the field.

(driver_name: &str)

Source from the content-addressed store, hash-verified

256/// to a specific subset so a gateway-wide default does not accidentally land
257/// in a driver table that does not understand the field.
258fn inheritable_keys(driver_name: &str) -> &'static [&'static str] {
259 match driver_name.parse::<ComputeDriverKind>().ok() {
260 Some(ComputeDriverKind::Kubernetes) => &[
261 "namespace",
262 "default_image",
263 "supervisor_image",
264 "client_tls_secret_name",
265 "service_account_name",
266 "host_gateway_ip",
267 "enable_user_namespaces",
268 "sa_token_ttl_secs",
269 ],
270 Some(ComputeDriverKind::Docker) => &[
271 "sandbox_namespace",
272 "default_image",
273 "supervisor_image",
274 "host_gateway_ip",
275 "guest_tls_ca",
276 "guest_tls_cert",
277 "guest_tls_key",
278 ],
279 Some(ComputeDriverKind::Podman) => &[
280 "default_image",
281 "supervisor_image",
282 "host_gateway_ip",
283 "guest_tls_ca",
284 "guest_tls_cert",
285 "guest_tls_key",
286 ],
287 Some(ComputeDriverKind::Vm) => &[
288 "default_image",
289 "guest_tls_ca",
290 "guest_tls_cert",
291 "guest_tls_key",
292 ],
293 None => &[],
294 }
295}
296
297fn gateway_inherited_value(g: &GatewayFileSection, key: &str) -> Option<toml::Value> {
298 match key {

Callers 1

driver_tableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected