mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
feat(ecs): register ECS service containers as ELBv2 targets (#929)
* feat(ecs): add loadBalancers to the ECS service model * feat(ecs): register ECS service containers as ELBv2 targets * test(ecs): cover loadBalancers parsing and ELBv2 target registration * fix(ecs): reject malformed loadBalancers entries on CreateService * refactor(ecs): gate loadBalancer deregister hook on dockerMode * refactor(ecs): collapse EcsService to a single constructor * fix(ecs): prefer a routable network when resolving container IP
This commit is contained in:
1 parent
9e7cbe012f
commit
eb1ca7b674
8 files changed
+544
-16
No files matched your search
@@ -1,12 +1,14 @@
|
||||
package io.github.hectorvent.floci.services.ecs;
|
||||
|
||||
import io.github.hectorvent.floci.core.common.AwsErrorResponse;
|
||||
import io.github.hectorvent.floci.core.common.AwsException;
|
||||
import io.github.hectorvent.floci.services.ecs.model.Attribute;
|
||||
import io.github.hectorvent.floci.services.ecs.model.CapacityProvider;
|
||||
import io.github.hectorvent.floci.services.ecs.model.ClusterSetting;
|
||||
import io.github.hectorvent.floci.services.ecs.model.ContainerDefinition;
|
||||
import io.github.hectorvent.floci.services.ecs.model.ContainerInstance;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsCluster;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsLoadBalancer;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsServiceModel;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsTask;
|
||||
import io.github.hectorvent.floci.services.ecs.model.KeyValuePair;
|
||||
@@ -370,15 +372,59 @@ public class EcsJsonHandler {
|
||||
String taskDefinition = req.path("taskDefinition").asText();
|
||||
int desiredCount = req.path("desiredCount").asInt(1);
|
||||
LaunchType launchType = parseEnum(req, "launchType", LaunchType.class);
|
||||
List<EcsLoadBalancer> loadBalancers = parseLoadBalancers(req.path("loadBalancers"));
|
||||
|
||||
EcsServiceModel svc = service.createService(cluster, serviceName, taskDefinition,
|
||||
desiredCount, launchType, region);
|
||||
desiredCount, launchType, loadBalancers, region);
|
||||
|
||||
ObjectNode resp = objectMapper.createObjectNode();
|
||||
resp.set("service", serviceNode(svc));
|
||||
return Response.ok(resp).build();
|
||||
}
|
||||
|
||||
private List<EcsLoadBalancer> parseLoadBalancers(JsonNode node) {
|
||||
List<EcsLoadBalancer> result = new ArrayList<>();
|
||||
if (node == null || !node.isArray()) {
|
||||
return result;
|
||||
}
|
||||
for (JsonNode lb : node) {
|
||||
String targetGroupArn = lb.hasNonNull("targetGroupArn")
|
||||
? lb.path("targetGroupArn").asText() : null;
|
||||
String loadBalancerName = lb.hasNonNull("loadBalancerName")
|
||||
? lb.path("loadBalancerName").asText() : null;
|
||||
String containerName = lb.hasNonNull("containerName")
|
||||
? lb.path("containerName").asText() : null;
|
||||
Integer containerPort = lb.hasNonNull("containerPort")
|
||||
? lb.path("containerPort").asInt() : null;
|
||||
|
||||
// AWS rejects malformed loadBalancers entries with InvalidParameterException.
|
||||
// containerName + containerPort are always required; an entry must target
|
||||
// either a target group (ALB/NLB) or a classic load balancer by name.
|
||||
if (containerName == null || containerName.isBlank()) {
|
||||
throw new AwsException("InvalidParameterException",
|
||||
"loadBalancers entry is missing the required containerName.", 400);
|
||||
}
|
||||
if (containerPort == null) {
|
||||
throw new AwsException("InvalidParameterException",
|
||||
"loadBalancers entry is missing the required containerPort.", 400);
|
||||
}
|
||||
boolean hasTargetGroup = targetGroupArn != null && !targetGroupArn.isBlank();
|
||||
boolean hasLoadBalancerName = loadBalancerName != null && !loadBalancerName.isBlank();
|
||||
if (!hasTargetGroup && !hasLoadBalancerName) {
|
||||
throw new AwsException("InvalidParameterException",
|
||||
"loadBalancers entry must specify either targetGroupArn or loadBalancerName.", 400);
|
||||
}
|
||||
|
||||
EcsLoadBalancer m = new EcsLoadBalancer();
|
||||
m.setTargetGroupArn(targetGroupArn);
|
||||
m.setLoadBalancerName(loadBalancerName);
|
||||
m.setContainerName(containerName);
|
||||
m.setContainerPort(containerPort);
|
||||
result.add(m);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private Response handleUpdateService(JsonNode req, String region) {
|
||||
String cluster = req.has("cluster") ? req.path("cluster").asText() : null;
|
||||
String serviceName = req.path("service").asText();
|
||||
@@ -955,6 +1001,18 @@ public class EcsJsonHandler {
|
||||
if (s.getTags() != null && !s.getTags().isEmpty()) {
|
||||
n.set("tags", tagsNode(s.getTags()));
|
||||
}
|
||||
if (s.getLoadBalancers() != null && !s.getLoadBalancers().isEmpty()) {
|
||||
ArrayNode lbs = objectMapper.createArrayNode();
|
||||
for (EcsLoadBalancer lb : s.getLoadBalancers()) {
|
||||
ObjectNode ln = objectMapper.createObjectNode();
|
||||
if (lb.getTargetGroupArn() != null) { ln.put("targetGroupArn", lb.getTargetGroupArn()); }
|
||||
if (lb.getLoadBalancerName() != null) { ln.put("loadBalancerName", lb.getLoadBalancerName()); }
|
||||
if (lb.getContainerName() != null) { ln.put("containerName", lb.getContainerName()); }
|
||||
if (lb.getContainerPort() != null) { ln.put("containerPort", lb.getContainerPort()); }
|
||||
lbs.add(ln);
|
||||
}
|
||||
n.set("loadBalancers", lbs);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
package io.github.hectorvent.floci.services.ecs;
|
||||
|
||||
import io.github.hectorvent.floci.services.ecs.container.EcsContainerManager;
|
||||
import io.github.hectorvent.floci.services.ecs.model.Container;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsLoadBalancer;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsServiceModel;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsTask;
|
||||
import io.github.hectorvent.floci.services.ecs.model.NetworkBinding;
|
||||
import io.github.hectorvent.floci.services.elbv2.ElbV2Service;
|
||||
import io.github.hectorvent.floci.services.elbv2.model.TargetDescription;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.inject.Inject;
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
/**
|
||||
* Bridges ECS services to ELBv2: when an ECS service declares a {@code loadBalancers}
|
||||
* block, this registrar registers each running task container as a target in the named
|
||||
* ELBv2 target group (and deregisters it when the task stops).
|
||||
* <p>
|
||||
* One-way dependency ECS → ELBv2; the ELBv2 data plane reaches the container over plain
|
||||
* TCP and never calls back into ECS, so there is no cycle.
|
||||
*/
|
||||
@ApplicationScoped
|
||||
public class EcsLoadBalancerRegistrar {
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(EcsLoadBalancerRegistrar.class);
|
||||
|
||||
private final ElbV2Service elbV2Service;
|
||||
private final EcsContainerManager containerManager;
|
||||
|
||||
@Inject
|
||||
public EcsLoadBalancerRegistrar(ElbV2Service elbV2Service, EcsContainerManager containerManager) {
|
||||
this.elbV2Service = elbV2Service;
|
||||
this.containerManager = containerManager;
|
||||
}
|
||||
|
||||
/** Registers the task's load-balanced containers as ELBv2 targets. */
|
||||
public void registerTask(EcsTask task, EcsServiceModel svc, String region) {
|
||||
forEachTarget(task, svc, (tgArn, td) -> {
|
||||
try {
|
||||
elbV2Service.registerTargets(region, tgArn, List.of(td));
|
||||
LOG.infov("Registered ECS task target {0}:{1} into target group {2}",
|
||||
td.getId(), td.getPort(), tgArn);
|
||||
} catch (Exception e) {
|
||||
LOG.warnv("Could not register ECS target into {0}: {1}", tgArn, e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Deregisters the task's load-balanced containers from their ELBv2 target groups. */
|
||||
public void deregisterTask(EcsTask task, EcsServiceModel svc, String region) {
|
||||
forEachTarget(task, svc, (tgArn, td) -> {
|
||||
try {
|
||||
elbV2Service.deregisterTargets(region, tgArn, List.of(td));
|
||||
LOG.infov("Deregistered ECS task target {0}:{1} from target group {2}",
|
||||
td.getId(), td.getPort(), tgArn);
|
||||
} catch (Exception e) {
|
||||
LOG.warnv("Could not deregister ECS target from {0}: {1}", tgArn, e.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void forEachTarget(EcsTask task, EcsServiceModel svc,
|
||||
BiConsumer<String, TargetDescription> action) {
|
||||
if (svc == null || svc.getLoadBalancers() == null || svc.getLoadBalancers().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
if (task.getContainers() == null || task.getContainers().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
for (EcsLoadBalancer lb : svc.getLoadBalancers()) {
|
||||
if (lb.getTargetGroupArn() == null || lb.getTargetGroupArn().isBlank()) {
|
||||
continue;
|
||||
}
|
||||
Container container = task.getContainers().stream()
|
||||
.filter(c -> lb.getContainerName() == null
|
||||
|| lb.getContainerName().equals(c.getName()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (container == null || container.getNetworkBindings() == null) {
|
||||
continue;
|
||||
}
|
||||
NetworkBinding binding = container.getNetworkBindings().stream()
|
||||
.filter(b -> lb.getContainerPort() == null
|
||||
|| lb.getContainerPort() == b.containerPort())
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (binding == null) {
|
||||
continue;
|
||||
}
|
||||
TargetDescription td = new TargetDescription();
|
||||
td.setId(containerManager.resolveContainerHost(container));
|
||||
td.setPort(binding.hostPort());
|
||||
action.accept(lb.getTargetGroupArn(), td);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import io.github.hectorvent.floci.services.ecs.model.ClusterSetting;
|
||||
import io.github.hectorvent.floci.services.ecs.model.ContainerDefinition;
|
||||
import io.github.hectorvent.floci.services.ecs.model.ContainerInstance;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsCluster;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsLoadBalancer;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsServiceModel;
|
||||
import io.github.hectorvent.floci.services.ecs.model.EcsTask;
|
||||
import io.github.hectorvent.floci.services.ecs.model.LaunchType;
|
||||
@@ -46,6 +47,7 @@ public class EcsService {
|
||||
|
||||
private final RegionResolver regionResolver;
|
||||
private final EcsContainerManager containerManager;
|
||||
private final EcsLoadBalancerRegistrar lbRegistrar;
|
||||
private final boolean dockerMode;
|
||||
private final String baseUrl;
|
||||
private final ScheduledExecutorService reconciler = Executors.newSingleThreadScheduledExecutor(
|
||||
@@ -80,21 +82,12 @@ public class EcsService {
|
||||
|
||||
@Inject
|
||||
public EcsService(RegionResolver regionResolver, EcsContainerManager containerManager,
|
||||
EmulatorConfig config) {
|
||||
this(regionResolver, containerManager, !config.services().ecs().mock(),
|
||||
config.effectiveBaseUrl());
|
||||
}
|
||||
|
||||
EcsService(RegionResolver regionResolver, EcsContainerManager containerManager) {
|
||||
this(regionResolver, containerManager, false, "http://localhost:4566");
|
||||
}
|
||||
|
||||
EcsService(RegionResolver regionResolver, EcsContainerManager containerManager, boolean dockerMode,
|
||||
String baseUrl) {
|
||||
EmulatorConfig config, EcsLoadBalancerRegistrar lbRegistrar) {
|
||||
this.regionResolver = regionResolver;
|
||||
this.containerManager = containerManager;
|
||||
this.dockerMode = dockerMode;
|
||||
this.baseUrl = baseUrl;
|
||||
this.dockerMode = !config.services().ecs().mock();
|
||||
this.baseUrl = config.effectiveBaseUrl();
|
||||
this.lbRegistrar = lbRegistrar;
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
@@ -301,6 +294,7 @@ public class EcsService {
|
||||
taskHandles.put(taskArn, handle);
|
||||
cluster.setRunningTasksCount(cluster.getRunningTasksCount() + 1);
|
||||
LOG.infov("Started ECS task (docker): {0}", taskArn);
|
||||
registerTaskWithLoadBalancers(task, cluster, group, region);
|
||||
} catch (Exception e) {
|
||||
LOG.errorv("Failed to start ECS task {0}: {1}", taskArn, e.getMessage());
|
||||
task.setLastStatus(TaskStatus.STOPPED.name());
|
||||
@@ -326,6 +320,8 @@ public class EcsService {
|
||||
task.setLastStatus(TaskStatus.STOPPING.name());
|
||||
task.setStoppedReason(reason != null ? reason : "Stopped by user");
|
||||
|
||||
deregisterTaskFromLoadBalancers(task, region);
|
||||
|
||||
if (dockerMode) {
|
||||
EcsTaskHandle handle = taskHandles.remove(task.getTaskArn());
|
||||
containerManager.stopTask(handle);
|
||||
@@ -346,6 +342,34 @@ public class EcsService {
|
||||
return task;
|
||||
}
|
||||
|
||||
/** Registers a freshly-started task's containers as ELBv2 targets if its service is load-balanced. */
|
||||
private void registerTaskWithLoadBalancers(EcsTask task, EcsCluster cluster, String group, String region) {
|
||||
if (group == null) {
|
||||
return;
|
||||
}
|
||||
EcsServiceModel svc = services.get(serviceKey(region, cluster.getClusterName(), group));
|
||||
if (svc != null && !svc.getLoadBalancers().isEmpty()) {
|
||||
lbRegistrar.registerTask(task, svc, region);
|
||||
}
|
||||
}
|
||||
|
||||
/** Deregisters a stopping task's containers from any ELBv2 target groups its service declared. */
|
||||
private void deregisterTaskFromLoadBalancers(EcsTask task, String region) {
|
||||
// Gated on dockerMode for symmetry with the register hook (inside launchTasks'
|
||||
// dockerMode branch): mock-mode tasks have no containers and never registered.
|
||||
if (!dockerMode || task.getGroup() == null) {
|
||||
return;
|
||||
}
|
||||
EcsCluster cluster = resolveClusterByArn(task.getClusterArn());
|
||||
if (cluster == null) {
|
||||
return;
|
||||
}
|
||||
EcsServiceModel svc = services.get(serviceKey(region, cluster.getClusterName(), task.getGroup()));
|
||||
if (svc != null && !svc.getLoadBalancers().isEmpty()) {
|
||||
lbRegistrar.deregisterTask(task, svc, region);
|
||||
}
|
||||
}
|
||||
|
||||
public List<EcsTask> describeTasks(String clusterRef, List<String> taskRefs, String region) {
|
||||
List<EcsTask> result = new ArrayList<>();
|
||||
for (String ref : taskRefs) {
|
||||
@@ -405,7 +429,8 @@ public class EcsService {
|
||||
// ── Services ──────────────────────────────────────────────────────────────
|
||||
|
||||
public EcsServiceModel createService(String clusterRef, String serviceName, String taskDefinition,
|
||||
int desiredCount, LaunchType launchType, String region) {
|
||||
int desiredCount, LaunchType launchType,
|
||||
List<EcsLoadBalancer> loadBalancers, String region) {
|
||||
EcsCluster cluster = resolveClusterOrDefault(clusterRef, region);
|
||||
resolveTaskDefinitionOrThrow(taskDefinition, region);
|
||||
|
||||
@@ -423,6 +448,7 @@ public class EcsService {
|
||||
svc.setTaskDefinition(taskDefinition);
|
||||
svc.setLaunchType(launchType != null ? launchType : LaunchType.FARGATE);
|
||||
svc.setDesiredCount(desiredCount);
|
||||
svc.setLoadBalancers(loadBalancers);
|
||||
svc.setStatus("ACTIVE");
|
||||
svc.setCreatedAt(Instant.now());
|
||||
|
||||
@@ -463,10 +489,11 @@ public class EcsService {
|
||||
throw new AwsException("InvalidParameterException",
|
||||
"The service cannot be stopped. Update the service to 0 tasks or use the force flag.", 400);
|
||||
}
|
||||
services.remove(key);
|
||||
svc.setStatus("INACTIVE");
|
||||
svc.setDesiredCount(0);
|
||||
cluster.setActiveServicesCount(Math.max(0, cluster.getActiveServicesCount() - 1));
|
||||
// Stop tasks before removing the service from the map, so the per-task
|
||||
// ELBv2 deregistration hook can still resolve the service's loadBalancers.
|
||||
tasks.values().stream()
|
||||
.filter(t -> t.getClusterArn().equals(cluster.getClusterArn()))
|
||||
.filter(t -> svc.getServiceArn().equals(t.getGroup())
|
||||
@@ -480,6 +507,7 @@ public class EcsService {
|
||||
t.getTaskArn(), e.getMessage());
|
||||
}
|
||||
});
|
||||
services.remove(key);
|
||||
return svc;
|
||||
}
|
||||
|
||||
|
||||
+58
@@ -173,6 +173,64 @@ public class EcsContainerManager {
|
||||
return envVars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the host address at which a running task container is reachable from the
|
||||
* Floci process — used to register the container as an ELBv2 target.
|
||||
* <p>
|
||||
* Native mode: the container's port is published to a host port, reachable at
|
||||
* {@code 127.0.0.1}. Floci-in-Docker mode: the container is reached by its IP on the
|
||||
* shared Docker network. Returns {@code 127.0.0.1} as a safe fallback.
|
||||
*/
|
||||
public String resolveContainerHost(Container container) {
|
||||
if (!containerDetector.isRunningInContainer()) {
|
||||
return "127.0.0.1";
|
||||
}
|
||||
String dockerId = container.getDockerId();
|
||||
if (dockerId == null || dockerId.isBlank()) {
|
||||
return "127.0.0.1";
|
||||
}
|
||||
try {
|
||||
var inspect = lifecycleManager.getDockerClient().inspectContainerCmd(dockerId).exec();
|
||||
var networks = inspect.getNetworkSettings().getNetworks();
|
||||
|
||||
// A container can be on multiple networks; getNetworks() is unordered.
|
||||
// Pick an IP that the Floci/ELBv2 process can actually route to:
|
||||
// 1. the explicitly-configured ECS Docker network, if set;
|
||||
// 2. otherwise any user-defined network (Floci joins one when in Docker)
|
||||
// in preference to the default bridge;
|
||||
// 3. otherwise the first non-blank IP.
|
||||
String configured = config.services().ecs().dockerNetwork().orElse(null);
|
||||
if (configured != null && !configured.isBlank()) {
|
||||
var net = networks.get(configured);
|
||||
if (net != null && isUsableIp(net.getIpAddress())) {
|
||||
return net.getIpAddress();
|
||||
}
|
||||
}
|
||||
for (var entry : networks.entrySet()) {
|
||||
if (!isDefaultDockerNetwork(entry.getKey())
|
||||
&& isUsableIp(entry.getValue().getIpAddress())) {
|
||||
return entry.getValue().getIpAddress();
|
||||
}
|
||||
}
|
||||
for (var net : networks.values()) {
|
||||
if (isUsableIp(net.getIpAddress())) {
|
||||
return net.getIpAddress();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.warnv("Could not resolve container IP for {0}: {1}", dockerId, e.getMessage());
|
||||
}
|
||||
return "127.0.0.1";
|
||||
}
|
||||
|
||||
private static boolean isUsableIp(String ip) {
|
||||
return ip != null && !ip.isBlank();
|
||||
}
|
||||
|
||||
private static boolean isDefaultDockerNetwork(String name) {
|
||||
return "bridge".equals(name) || "host".equals(name) || "none".equals(name);
|
||||
}
|
||||
|
||||
private List<NetworkBinding> resolveNetworkBindings(String dockerId, ContainerDefinition def) {
|
||||
List<NetworkBinding> bindings = new ArrayList<>();
|
||||
if (def.getPortMappings() == null || def.getPortMappings().isEmpty()) {
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package io.github.hectorvent.floci.services.ecs.model;
|
||||
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
/**
|
||||
* A load balancer association on an ECS service ({@code CreateService}'s
|
||||
* {@code loadBalancers} block). Links a container port on the service's tasks
|
||||
* to an ELBv2 target group so running task containers can be registered as targets.
|
||||
*/
|
||||
@RegisterForReflection
|
||||
public class EcsLoadBalancer {
|
||||
|
||||
private String targetGroupArn;
|
||||
private String loadBalancerName;
|
||||
private String containerName;
|
||||
private Integer containerPort;
|
||||
|
||||
public EcsLoadBalancer() {}
|
||||
|
||||
public String getTargetGroupArn() { return targetGroupArn; }
|
||||
public void setTargetGroupArn(String targetGroupArn) { this.targetGroupArn = targetGroupArn; }
|
||||
|
||||
public String getLoadBalancerName() { return loadBalancerName; }
|
||||
public void setLoadBalancerName(String loadBalancerName) { this.loadBalancerName = loadBalancerName; }
|
||||
|
||||
public String getContainerName() { return containerName; }
|
||||
public void setContainerName(String containerName) { this.containerName = containerName; }
|
||||
|
||||
public Integer getContainerPort() { return containerPort; }
|
||||
public void setContainerPort(Integer containerPort) { this.containerPort = containerPort; }
|
||||
}
|
||||
@@ -3,7 +3,9 @@ package io.github.hectorvent.floci.services.ecs.model;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RegisterForReflection
|
||||
@@ -22,6 +24,7 @@ public class EcsServiceModel {
|
||||
private String namespace;
|
||||
private String deploymentController;
|
||||
private Map<String, String> tags = new HashMap<>();
|
||||
private List<EcsLoadBalancer> loadBalancers = new ArrayList<>();
|
||||
|
||||
public String getServiceArn() { return serviceArn; }
|
||||
public void setServiceArn(String serviceArn) { this.serviceArn = serviceArn; }
|
||||
@@ -61,4 +64,9 @@ public class EcsServiceModel {
|
||||
|
||||
public Map<String, String> getTags() { return tags; }
|
||||
public void setTags(Map<String, String> tags) { this.tags = tags; }
|
||||
|
||||
public List<EcsLoadBalancer> getLoadBalancers() { return loadBalancers; }
|
||||
public void setLoadBalancers(List<EcsLoadBalancer> loadBalancers) {
|
||||
this.loadBalancers = loadBalancers != null ? loadBalancers : new ArrayList<>();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user