mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
A Service Connect service that offers endpoints now has them in the Cloud Map namespace it joined. CreateService and UpdateService create an HTTP Cloud Map service for each services[] entry, named by its discoveryName or else its portName, and one for a client configuration, aws-ecs-sc.client.<UUID>.<service name>, described "Managed by" the ECS service and tagged AmazonECSManaged=true. Each deployment reports them as serviceConnectResources. UpdateService keeps, creates and deletes them to match, turning Service Connect off or DeleteService deletes them all, and a circuit-breaker rollback brings them back in line. Discovery names are checked before anything is created, under a lock per namespace: one outside ECS's naming rule, one named twice, one another ECS service holds and one a Cloud Map service created outside ECS holds are refused with ECS's messages, ClientException on CreateService and InvalidParameterException on UpdateService. ECS only reuses or deletes Cloud Map services it made. Cloud Map's duplicate-name check moves into CloudMapService.findServiceByName, shared with the registrar.