aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java
diff options
context:
space:
mode:
Diffstat (limited to 'controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java
index be533b0c53b..16f12b3ac07 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/RoutingController.java
@@ -243,7 +243,8 @@ public class RoutingController {
Instance instance = application.require(instanceName);
boolean registerLegacyNames = requiresLegacyNames(application.deploymentSpec(), instanceName);
Set<ContainerEndpoint> containerEndpoints = new HashSet<>();
- EndpointList endpoints = declaredEndpointsOf(application);
+ DeploymentId deployment = new DeploymentId(instance.id(), zone);
+ EndpointList endpoints = declaredEndpointsOf(application).targets(deployment);
EndpointList globalEndpoints = endpoints.scope(Endpoint.Scope.global);
// Add endpoints backed by a rotation, and register them in DNS if necessary
for (var assignedRotation : instance.rotations()) {
@@ -280,9 +281,7 @@ public class RoutingController {
}
// Add endpoints not backed by a rotation (i.e. other routing methods so that the config server always knows
// about global names, even when not using rotations)
- DeploymentId deployment = new DeploymentId(instance.id(), zone);
globalEndpoints.not().requiresRotation()
- .targets(deployment)
.groupingBy(Endpoint::cluster)
.forEach((clusterId, clusterEndpoints) -> {
containerEndpoints.add(new ContainerEndpoint(clusterId.value(),
@@ -290,10 +289,8 @@ public class RoutingController {
clusterEndpoints.mapToList(Endpoint::dnsName)));
});
// Add application endpoints
- EndpointList applicationEndpoints = endpoints.scope(Endpoint.Scope.application)
- .not().direct() // These are handled by RoutingPolicies
- .targets(deployment);
- for (var endpoint : applicationEndpoints) {
+ EndpointList applicationEndpoints = endpoints.scope(Endpoint.Scope.application);
+ for (var endpoint : applicationEndpoints.shared()) { // DNS for non-shared endpoints is handled by RoutingPolicies
Set<ZoneId> targetZones = endpoint.targets().stream()
.map(t -> t.deployment().zoneId())
.collect(Collectors.toUnmodifiableSet());