aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java31
1 files changed, 6 insertions, 25 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
index 6982f10f658..8f95e390b07 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ApplicationContainerCluster.java
@@ -47,7 +47,6 @@ import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
-import static com.yahoo.config.model.api.ApplicationClusterEndpoint.RoutingMethod.shared;
import static com.yahoo.config.model.api.ApplicationClusterEndpoint.RoutingMethod.sharedLayer4;
/**
@@ -180,21 +179,18 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat
return Optional.empty();
}
- /*
- Create list of endpoints, these will be consumed later by the LBservicesProducer
- */
+ /** Create list of endpoints, these will be consumed later by LbServicesProducer */
private void createEndpointList(DeployState deployState) {
if(!deployState.isHosted()) return;
if(deployState.getProperties().applicationId().instance().isTester()) return;
List<ApplicationClusterEndpoint> endpoints = new ArrayList<>();
- // Add zone local endpoints using zone dns suffixes, tenant, application and cluster id.
- // For now support both L7 and L4 routing
+ // Add zone local endpoints using zone dns suffixes, tenant, application and cluster id.
List<String> hosts = getContainers().stream()
.map(AbstractService::getHostName)
.collect(Collectors.toList());
- for(String suffix : deployState.getProperties().zoneDnsSuffixes()) {
- // L4
+
+ for (String suffix : deployState.getProperties().zoneDnsSuffixes()) {
ApplicationClusterEndpoint.DnsName l4Name = ApplicationClusterEndpoint.DnsName.sharedL4NameFrom(
deployState.zone().system(),
ClusterSpec.Id.from(getName()),
@@ -207,28 +203,13 @@ public final class ApplicationContainerCluster extends ContainerCluster<Applicat
.hosts(hosts)
.clusterId(getName())
.build());
-
- // L7
- ApplicationClusterEndpoint.DnsName l7Name = ApplicationClusterEndpoint.DnsName.sharedNameFrom(
- deployState.zone().system(),
- ClusterSpec.Id.from(getName()),
- deployState.getProperties().applicationId(),
- suffix);
- endpoints.add(ApplicationClusterEndpoint.builder()
- .zoneScope()
- .sharedRouting()
- .dnsName(l7Name)
- .hosts(hosts)
- .clusterId(getName())
- .build());
}
- // Then get all endpoints provided by controller.
- Set<ApplicationClusterEndpoint.RoutingMethod> supportedRoutingMethods = Set.of(shared, sharedLayer4);
+ // Include all endpoints provided by controller
Set<ContainerEndpoint> endpointsFromController = deployState.getEndpoints();
endpointsFromController.stream()
.filter(ce -> ce.clusterId().equals(getName()))
- .filter(ce -> supportedRoutingMethods.contains(ce.routingMethod()))
+ .filter(ce -> ce.routingMethod() == sharedLayer4)
.forEach(ce -> ce.names().forEach(
name -> endpoints.add(ApplicationClusterEndpoint.builder()
.scope(ce.scope())