(name: &str, crt_pem: &str, key_pem: &str, ca_pem: &str)
| 294 | } |
| 295 | |
| 296 | fn tls_secret(name: &str, crt_pem: &str, key_pem: &str, ca_pem: &str) -> Secret { |
| 297 | let mut data = BTreeMap::new(); |
| 298 | data.insert( |
| 299 | "tls.crt".to_string(), |
| 300 | ByteString(crt_pem.as_bytes().to_vec()), |
| 301 | ); |
| 302 | data.insert( |
| 303 | "tls.key".to_string(), |
| 304 | ByteString(key_pem.as_bytes().to_vec()), |
| 305 | ); |
| 306 | data.insert("ca.crt".to_string(), ByteString(ca_pem.as_bytes().to_vec())); |
| 307 | Secret { |
| 308 | metadata: ObjectMeta { |
| 309 | name: Some(name.to_string()), |
| 310 | ..Default::default() |
| 311 | }, |
| 312 | type_: Some("kubernetes.io/tls".to_string()), |
| 313 | data: Some(data), |
| 314 | ..Default::default() |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | /// Build an `Opaque` Secret carrying the gateway-minted sandbox JWT |
| 319 | /// signing material. Mounted only on the gateway pod — sandbox pods |
no outgoing calls