Files
floci/src/main/java
Robin BaeckmanandRobin Baeckman 204231d4b3 fix(eks): restore persisted clusters at startup (#6214)
EksService restores persisted clusters in @PostConstruct, but CDI creates
the bean on first use. After a restart no cluster's k3s container came
back until something called the EKS API, so workloads on it stayed down.
EmulatorLifecycle now calls EksService.restorePersistedRuntime from
onHttpStart, after the start and ready hooks. It waits for the IMDS server
to start, because a recreated cluster's Pod Identity and IMDS relays probe
Floci's HTTP port and IMDS before they route pod traffic there. It runs
after the hooks so they and the ready line don't wait minutes for k3s.
If the restore throws, it is logged and the emulator stays up; EKS
requests retry creating the service, as before.

EksBootRestoreIntegrationTest boots a fresh application with EKS out of
mock mode and checks EksService was created without an EKS request, as
EcsBootReconcilerIntegrationTest does for ECS. Its profile pins the HTTP
port, since onHttpStart acts only on quarkus.http.port.

Co-authored-by: Robin Baeckman <27041454+RobinBaeckman@users.noreply.github.com>
2026-10-23 06:55:02 -04:00
..