Expand description
Pod spec construction for the Kubernetes super::K8sBackend.
Pure functions over k8s_openapi::api::core::v1::Pod — no cluster
interaction, fully unit-testable.
Structs§
- PodSpec
Context - Inputs that don’t come from the function itself — instance identity, the in-cluster fakecloud URL, the bearer token the init container uses to fetch code/layers, etc.
Functions§
- build_
pod_ spec - Build the Pod spec for a single Lambda function invocation runtime. The Pod has one init container (busybox) that downloads code + layers from fakecloud over HTTP, and one main container running the AWS RIE image (zip functions) or the user-supplied image (image functions).
- pod_
name_ for - Build a deterministic, DNS-1123-safe Pod name for the given
function + deploy_id. Truncated/lowercased so it fits the 63-char
label limit. The suffix is a stable hash of
deploy_idso a new deploy gets a fresh, non-colliding Pod name. - unique_
pod_ name - Build a per-launch unique DNS-1123-safe Pod name. The deterministic
pod_name_forname collides whenever the warm pool needs more than one concurrent instance of a function (the RIE serves one invocation at a time), and a still-terminating Pod blocks its replacement (AlreadyExists/ “object is being deleted” /NotFoundraces). Salting the hashed id with a process-monotonic counter yields a fresh, length-bounded name per launch, so instances never collide and a dying Pod never wedges a new one.