mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
Wires the pieces together so a task that declares a taskRoleArn actually gets credentials. EcsContainerManager issues the task's session, stands the proxy up on the network its containers join, publishes one relative URI to every container in the task the way real ECS does, and gives each container its own address in 169.254.0.0/16 so it has a connected route to the endpoint at all. Credentials and addresses are released when the task stops, exits, or fails part way through a launch. EcsTaskLinkLocalAddresses owns the addresses because Docker will not: it accepts two containers claiming the same link-local address on one network and then which one answers depends on whose ARP reply wins. Addresses are tracked per network, since separate networks are separate L2 segments, and freed with the task. ContainerBuilder.resolveDockerNetwork exposes the network a spec would land on, which the allocator needs before the spec exists. withDockerNetwork now calls the same method rather than keeping a second copy of the resolution. A security-group protected task is skipped for now and says so: those containers run in an isolated helper namespace that the proxy's address does not reach, so issuing credentials there would hand out an endpoint the task cannot use. Closes #4483.