feat(lambda): give Unschedulable pods a kubernetes grace period (#9109)

With floci.services.lambda.kubernetes.unschedulable-grace-seconds (FLOCI_SERVICES_LAMBDA_KUBERNETES_UNSCHEDULABLE_GRACE_SECONDS, default 0), a Lambda pod the Kubernetes scheduler reports Unschedulable gets that long before its cold start fails, so a node autoscaler such as Karpenter can add a node. The grace is measured from when Floci first observes the reason, since the PodScheduled condition's lastTransitionTime keeps an older timestamp across a SchedulingGated to Unschedulable flip, and the pod startup timeout still bounds the wait. The default keeps the immediate failure.

Closes #8995
This commit is contained in:
Matheus Oliveira authored and GitHub committed 2026-11-24 11:36:23 -04:00
1 parent 6c451bbcc5
commit 19d0955c7c
6 files changed
+236 -32

No files matched your search

+1
View File
@@ -762,6 +762,7 @@ Configuration resource reads and `ListFunctionsByCodeSigningConfig` return
| `FLOCI_SERVICES_LAMBDA_KUBERNETES_TOLERATIONS` | *(unset)* | Pod tolerations as comma-separated taints in `kubectl taint` syntax: `key=value:Effect` (operator `Equal`) or `key:Effect` (operator `Exists`); leave out `:Effect` to tolerate every effect |
| `FLOCI_SERVICES_LAMBDA_KUBERNETES_FLOCI_ADDRESS` | *(unset)* | Host/IP pods use to reach Floci; auto-detected when Floci runs in-cluster |
| `FLOCI_SERVICES_LAMBDA_KUBERNETES_INIT_IMAGE` | `busybox:1.36` | Init-container image that downloads function code (needs `sh`, `wget`, `unzip`) |
| `FLOCI_SERVICES_LAMBDA_KUBERNETES_UNSCHEDULABLE_GRACE_SECONDS` | `0` | Seconds a pod the scheduler reports Unschedulable may wait while a cluster autoscaler adds a node, measured from when Floci first observes the reason (the PodScheduled condition's lastTransitionTime records status transitions only, so it is not used); `0` fails the cold start immediately |
!!! note "Changing the container name prefix"
Code volumes are resolved by name, and a Floci process only manages resources under its