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)
| 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. |
| 258 | fn 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 | |
| 297 | fn gateway_inherited_value(g: &GatewayFileSection, key: &str) -> Option<toml::Value> { |
| 298 | match key { |