diff options
Diffstat (limited to 'controller-server/src/main')
7 files changed, 83 insertions, 134 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 6e3a303f7e5..5d02302795d 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 @@ -86,8 +86,8 @@ public class RoutingController { return rotationRepository; } - /** Read and return zone-scoped endpoints for given deployment */ - public EndpointList readEndpointsOf(DeploymentId deployment) { + /** Returns endpoints for given deployment */ + public EndpointList endpointsOf(DeploymentId deployment) { Set<Endpoint> endpoints = new LinkedHashSet<>(); boolean isSystemApplication = SystemApplication.matching(deployment.applicationId()).isPresent(); // Avoid reading application more than once per call to this @@ -104,52 +104,53 @@ public class RoutingController { return EndpointList.copyOf(endpoints); } - /** Read application and return declared endpoints for given instance */ - public EndpointList readDeclaredEndpointsOf(ApplicationId instance) { + /** Returns global-scoped endpoints for given instance */ + public EndpointList endpointsOf(ApplicationId instance) { if (SystemApplication.matching(instance).isPresent()) return EndpointList.EMPTY; - return readDeclaredEndpointsOf(TenantAndApplicationId.from(instance)).instance(instance.instance()); + return endpointsOf(controller.applications().requireApplication(TenantAndApplicationId.from(instance)), + instance.instance()); } - /** Read application and return declared endpoints for given application */ - public EndpointList readDeclaredEndpointsOf(TenantAndApplicationId application) { - return declaredEndpointsOf(controller.applications().requireApplication(application)); + /** Returns global-scoped endpoints for given instance */ + public EndpointList endpointsOf(Application application, InstanceName instanceName) { + Set<Endpoint> endpoints = new LinkedHashSet<>(); + Instance instance = application.require(instanceName); + DeploymentSpec deploymentSpec = application.deploymentSpec(); + Optional<DeploymentInstanceSpec> spec = deploymentSpec.instance(instanceName); + if (spec.isEmpty()) return EndpointList.EMPTY; + // Add endpoint declared with legacy syntax + spec.get().globalServiceId().ifPresent(clusterId -> { + List<DeploymentId> deployments = spec.get().zones().stream() + .filter(zone -> zone.concerns(Environment.prod)) + .map(zone -> new DeploymentId(instance.id(), ZoneId.from(Environment.prod, zone.region().get()))) + .collect(Collectors.toList()); + RoutingId routingId = RoutingId.of(instance.id(), EndpointId.defaultId()); + endpoints.addAll(computeGlobalEndpoints(routingId, ClusterSpec.Id.from(clusterId), deployments, deploymentSpec)); + }); + // Add endpoints declared with current syntax + spec.get().endpoints().forEach(declaredEndpoint -> { + RoutingId routingId = RoutingId.of(instance.id(), EndpointId.of(declaredEndpoint.endpointId())); + List<DeploymentId> deployments = declaredEndpoint.regions().stream() + .map(region -> new DeploymentId(instance.id(), + ZoneId.from(Environment.prod, region))) + .collect(Collectors.toList()); + endpoints.addAll(computeGlobalEndpoints(routingId, ClusterSpec.Id.from(declaredEndpoint.containerId()), deployments, deploymentSpec)); + }); + return EndpointList.copyOf(endpoints); } - /** Returns endpoints declared in {@link DeploymentSpec} for given application */ - public EndpointList declaredEndpointsOf(Application application) { + /** Returns application-scoped endpoints for given application */ + public EndpointList endpointsOf(TenantAndApplicationId applicationId) { + Application app = controller.applications().requireApplication(applicationId); Set<Endpoint> endpoints = new LinkedHashSet<>(); - for (var instance : application.instances().values()) { - DeploymentSpec deploymentSpec = application.deploymentSpec(); - Optional<DeploymentInstanceSpec> spec = application.deploymentSpec().instance(instance.name()); - if (spec.isEmpty()) return EndpointList.EMPTY; - // Add endpoint declared with legacy syntax - spec.get().globalServiceId().ifPresent(clusterId -> { - List<DeploymentId> deployments = spec.get().zones().stream() - .filter(zone -> zone.concerns(Environment.prod)) - .map(zone -> new DeploymentId(instance.id(), ZoneId.from(Environment.prod, zone.region().get()))) - .collect(Collectors.toList()); - RoutingId routingId = RoutingId.of(instance.id(), EndpointId.defaultId()); - endpoints.addAll(computeGlobalEndpoints(routingId, ClusterSpec.Id.from(clusterId), deployments, deploymentSpec)); - }); - // Add endpoints declared with current syntax - spec.get().endpoints().forEach(declaredEndpoint -> { - RoutingId routingId = RoutingId.of(instance.id(), EndpointId.of(declaredEndpoint.endpointId())); - List<DeploymentId> deployments = declaredEndpoint.regions().stream() - .map(region -> new DeploymentId(instance.id(), - ZoneId.from(Environment.prod, region))) - .collect(Collectors.toList()); - endpoints.addAll(computeGlobalEndpoints(routingId, ClusterSpec.Id.from(declaredEndpoint.containerId()), deployments, deploymentSpec)); - }); - } - // Add application endpoints - for (var declaredEndpoint : application.deploymentSpec().endpoints()) { + for (var declaredEndpoint : app.deploymentSpec().endpoints()) { Map<DeploymentId, Integer> deployments = declaredEndpoint.targets().stream() - .collect(Collectors.toMap(t -> new DeploymentId(application.id().instance(t.instance()), + .collect(Collectors.toMap(t -> new DeploymentId(applicationId.instance(t.instance()), ZoneId.from(Environment.prod, t.region())), t -> t.weight())); - List<RoutingMethod> availableRoutingMethods = routingMethodsOfAll(deployments.keySet(), application.deploymentSpec()); + List<RoutingMethod> availableRoutingMethods = routingMethodsOfAll(deployments.keySet(), app.deploymentSpec()); for (var routingMethod : availableRoutingMethods) { - endpoints.add(Endpoint.of(application.id()) + endpoints.add(Endpoint.of(applicationId) .targetApplication(EndpointId.of(declaredEndpoint.endpointId()), ClusterSpec.Id.from(declaredEndpoint.containerId()), deployments) @@ -161,11 +162,11 @@ public class RoutingController { return EndpointList.copyOf(endpoints); } - /** Read and return zone-scoped endpoints for given deployments, grouped by their zone */ - public Map<ZoneId, List<Endpoint>> readZoneEndpointsOf(Collection<DeploymentId> deployments) { + /** Returns all zone-scoped endpoints and corresponding cluster IDs for given deployments, grouped by their zone */ + public Map<ZoneId, List<Endpoint>> zoneEndpointsOf(Collection<DeploymentId> deployments) { var endpoints = new TreeMap<ZoneId, List<Endpoint>>(Comparator.comparing(ZoneId::value)); for (var deployment : deployments) { - EndpointList zoneEndpoints = readEndpointsOf(deployment).scope(Endpoint.Scope.zone).not().legacy(); + EndpointList zoneEndpoints = endpointsOf(deployment).scope(Endpoint.Scope.zone).not().legacy(); zoneEndpoints = directEndpoints(zoneEndpoints, deployment.applicationId()); if ( ! zoneEndpoints.isEmpty()) { endpoints.put(deployment.zoneId(), zoneEndpoints.asList()); @@ -205,7 +206,7 @@ public class RoutingController { /** Change status of all global endpoints for given deployment */ public void setGlobalRotationStatus(DeploymentId deployment, EndpointStatus status) { - readDeclaredEndpointsOf(deployment.applicationId()).requiresRotation().primary().ifPresent(endpoint -> { + endpointsOf(deployment.applicationId()).requiresRotation().primary().ifPresent(endpoint -> { try { controller.serviceRegistry().configServer().setGlobalRotationStatus(deployment, endpoint.upstreamIdOf(deployment), status); } catch (Exception e) { @@ -217,7 +218,7 @@ public class RoutingController { /** Get global endpoint status for given deployment */ public Map<Endpoint, EndpointStatus> globalRotationStatus(DeploymentId deployment) { var routingEndpoints = new LinkedHashMap<Endpoint, EndpointStatus>(); - readDeclaredEndpointsOf(deployment.applicationId()).requiresRotation().primary().ifPresent(endpoint -> { + endpointsOf(deployment.applicationId()).requiresRotation().primary().ifPresent(endpoint -> { var upstreamName = endpoint.upstreamIdOf(deployment); var status = controller.serviceRegistry().configServer().getGlobalRotationStatus(deployment, upstreamName); routingEndpoints.put(endpoint, status); @@ -240,18 +241,17 @@ public class RoutingController { return application; } - /** Returns the global and application-level endpoints for given deployment, as container endpoints */ + /** Returns the global endpoints for given deployment as container endpoints */ public Set<ContainerEndpoint> containerEndpointsOf(Application application, InstanceName instanceName, ZoneId zone) { Instance instance = application.require(instanceName); - boolean registerLegacyNames = requiresLegacyNames(application.deploymentSpec(), instanceName); + boolean registerLegacyNames = legacyNamesAvailable(application.deploymentSpec(), instanceName); Set<ContainerEndpoint> containerEndpoints = new HashSet<>(); - EndpointList endpoints = declaredEndpointsOf(application); - EndpointList globalEndpoints = endpoints.scope(Endpoint.Scope.global); + EndpointList endpoints = endpointsOf(application, instanceName); // Add endpoints backed by a rotation, and register them in DNS if necessary for (var assignedRotation : instance.rotations()) { var names = new ArrayList<String>(); - EndpointList rotationEndpoints = globalEndpoints.named(assignedRotation.endpointId()) - .requiresRotation(); + EndpointList rotationEndpoints = endpoints.named(assignedRotation.endpointId()) + .requiresRotation(); // Skip rotations which do not apply to this zone. Legacy names always point to all zones if (!registerLegacyNames && !assignedRotation.regions().contains(zone.region())) { @@ -276,45 +276,17 @@ public class RoutingController { // Include rotation ID as a valid name of this container endpoint (required by global routing health checks) names.add(assignedRotation.rotationId().asString()); - containerEndpoints.add(new ContainerEndpoint(assignedRotation.clusterId().value(), - asString(Endpoint.Scope.global), - names)); + containerEndpoints.add(new ContainerEndpoint(assignedRotation.clusterId().value(), names)); } - // 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) + // Add endpoints not backed by a rotation DeploymentId deployment = new DeploymentId(instance.id(), zone); - globalEndpoints.not().requiresRotation() - .targets(deployment) - .groupingBy(Endpoint::cluster) - .forEach((clusterId, clusterEndpoints) -> { - containerEndpoints.add(new ContainerEndpoint(clusterId.value(), - asString(Endpoint.Scope.global), - 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) { - Set<ZoneId> targetZones = endpoint.targets().stream() - .map(t -> t.deployment().zoneId()) - .collect(Collectors.toUnmodifiableSet()); - if (targetZones.size() != 1) throw new IllegalArgumentException("Endpoint '" + endpoint.name() + - "' must target a single zone, got " + - targetZones); - ZoneId targetZone = targetZones.iterator().next(); - String vipHostname = controller.zoneRegistry().getVipHostname(targetZone) - .orElseThrow(() -> new IllegalArgumentException("No VIP configured for zone " + targetZone)); - controller.nameServiceForwarder().createCname(RecordName.from(endpoint.dnsName()), - RecordData.fqdn(vipHostname), - Priority.normal); - } - applicationEndpoints.groupingBy(Endpoint::cluster) - .forEach((clusterId, clusterEndpoints) -> { - containerEndpoints.add(new ContainerEndpoint(clusterId.value(), - asString(Endpoint.Scope.application), - clusterEndpoints.mapToList(Endpoint::dnsName))); - }); + endpoints.not().requiresRotation() + .targets(deployment) + .groupingBy(Endpoint::cluster) + .forEach((clusterId, clusterEndpoints) -> { + containerEndpoints.add(new ContainerEndpoint(clusterId.value(), + clusterEndpoints.mapToList(Endpoint::dnsName))); + }); return Collections.unmodifiableSet(containerEndpoints); } @@ -380,8 +352,9 @@ public class RoutingController { private List<Endpoint> computeGlobalEndpoints(RoutingId routingId, ClusterSpec.Id cluster, List<DeploymentId> deployments, DeploymentSpec deploymentSpec) { var endpoints = new ArrayList<Endpoint>(); var directMethods = 0; + var zones = deployments.stream().map(DeploymentId::zoneId).collect(Collectors.toList()); var availableRoutingMethods = routingMethodsOfAll(deployments, deploymentSpec); - boolean legacyNamesAvailable = requiresLegacyNames(deploymentSpec, routingId.instance().instance()); + boolean legacyNamesAvailable = legacyNamesAvailable(deploymentSpec, routingId.instance().instance()); for (var method : availableRoutingMethods) { if (method.isDirect() && ++directMethods > 1) { @@ -413,7 +386,7 @@ public class RoutingController { } /** Whether legacy global DNS names should be available for given application */ - private static boolean requiresLegacyNames(DeploymentSpec deploymentSpec, InstanceName instanceName) { + private static boolean legacyNamesAvailable(DeploymentSpec deploymentSpec, InstanceName instanceName) { return deploymentSpec.instance(instanceName) .flatMap(DeploymentInstanceSpec::globalServiceId) .isPresent(); @@ -437,14 +410,5 @@ public class RoutingController { return endpoints; } - private static String asString(Endpoint.Scope scope) { - switch (scope) { - case application: return "application"; - case global: return "global"; - case weighted: return "weighted"; - case zone: return "zone"; - } - throw new IllegalArgumentException("Unknown scope " + scope); - } } diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java index 35601dd94dd..3698c794e8f 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Endpoint.java @@ -36,7 +36,6 @@ public class Endpoint { private final EndpointId id; private final ClusterSpec.Id cluster; - private final Optional<InstanceName> instance; private final URI url; private final List<Target> targets; private final Scope scope; @@ -60,11 +59,11 @@ public class Endpoint { if (scope == Scope.zone && id != null) throw new IllegalArgumentException("Endpoint ID cannot be set for " + scope + " endpoints"); if (targets.size() != 1) throw new IllegalArgumentException("A single target must be given for " + scope + " endpoints"); } - if (scope != Scope.application && instanceName.isEmpty()) { + if (scope != Scope.region && instanceName.isEmpty()) { throw new IllegalArgumentException("Instance must be set for scope " + scope); } for (var target : targets) { - if (scope == Scope.application) { + if (scope == Scope.region) { TenantAndApplicationId owner = TenantAndApplicationId.from(target.deployment().applicationId()); if (!owner.equals(application)) { throw new IllegalArgumentException(id + " has target owned by " + owner + @@ -82,7 +81,6 @@ public class Endpoint { } this.id = id; this.cluster = cluster; - this.instance = instanceName; this.url = url; this.targets = List.copyOf(targets); this.scope = scope; @@ -126,11 +124,6 @@ public class Endpoint { return cluster; } - /** The specific instance this endpoint points to, if any */ - public Optional<InstanceName> instance() { - return instance; - } - /** Returns the URL used to access this */ public URI url() { return url; @@ -261,14 +254,14 @@ public class Endpoint { case zone: return "z"; case weighted: return "w"; case global: return "g"; - case application: return "r"; + case region: return "r"; } } switch (scope) { case zone: return ""; case weighted: return "w"; case global: return "global"; - case application: return "r"; + case region: return "r"; } throw new IllegalArgumentException("No scope symbol defined for " + scope + " in " + system); } @@ -360,7 +353,7 @@ public class Endpoint { * * Traffic is routed across instances according to weights specified in deployment.xml */ - application, + region, /** Endpoint points to one or more zones. Traffic is routed to the zone closest to the client */ global, @@ -377,7 +370,7 @@ public class Endpoint { /** Returns whether this scope may span multiple deployments */ public boolean multiDeployment() { - return this == application || this == global; + return this == region || this == global; } } @@ -539,7 +532,7 @@ public class Endpoint { this.targets = deployments.entrySet().stream() .map(kv -> new Target(kv.getKey(), kv.getValue())) .collect(Collectors.toUnmodifiableList()); - this.scope = Scope.application; + this.scope = Scope.region; return this; } diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/EndpointList.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/EndpointList.java index f626d832b6a..1ad315545e3 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/EndpointList.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/EndpointList.java @@ -3,7 +3,6 @@ package com.yahoo.vespa.hosted.controller.application; import com.yahoo.collections.AbstractFilteringList; import com.yahoo.config.provision.ClusterSpec; -import com.yahoo.config.provision.InstanceName; import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId; import java.util.Collection; @@ -42,12 +41,6 @@ public class EndpointList extends AbstractFilteringList<Endpoint, EndpointList> return matching(endpoint -> endpoint.cluster().equals(cluster)); } - /** Returns the subset of endpoints pointing to given instance */ - public EndpointList instance(InstanceName instance) { - return matching(endpoint -> endpoint.instance().isPresent() && - endpoint.instance().get().equals(instance)); - } - /** Returns the subset of endpoints which target all of the given deployments */ public EndpointList targets(List<DeploymentId> deployments) { return matching(endpoint -> endpoint.deployments().containsAll(deployments)); diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java index 577dab69279..ee955fa8ff8 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java @@ -451,7 +451,7 @@ public class InternalStepRunner implements StepRunner { /** Returns true iff all calls to endpoint in the deployment give 100 consecutive 200 OK responses on /status.html. */ private boolean containersAreUp(ApplicationId id, ZoneId zoneId, DualLogger logger) { - var endpoints = controller.routing().readZoneEndpointsOf(Set.of(new DeploymentId(id, zoneId))); + var endpoints = controller.routing().zoneEndpointsOf(Set.of(new DeploymentId(id, zoneId))); if ( ! endpoints.containsKey(zoneId)) return false; @@ -477,7 +477,7 @@ public class InternalStepRunner implements StepRunner { } private boolean endpointsAvailable(ApplicationId id, ZoneId zone, DualLogger logger) { - var endpoints = controller.routing().readZoneEndpointsOf(Set.of(new DeploymentId(id, zone))); + var endpoints = controller.routing().zoneEndpointsOf(Set.of(new DeploymentId(id, zone))); if ( ! endpoints.containsKey(zone)) { logger.log("Endpoints not yet ready."); return false; @@ -586,7 +586,7 @@ public class InternalStepRunner implements StepRunner { deployments.add(new DeploymentId(id.application(), zoneId)); logger.log("Attempting to find endpoints ..."); - var endpoints = controller.routing().readZoneEndpointsOf(deployments); + var endpoints = controller.routing().zoneEndpointsOf(deployments); if ( ! endpoints.containsKey(zoneId)) { logger.log(WARNING, "Endpoints for the deployment to test vanished again, while it was still active!"); return Optional.of(error); diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java index 0ecf259be1c..4144eda212b 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java @@ -1371,7 +1371,7 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler { // Add zone endpoints boolean legacyEndpoints = request.getBooleanProperty("includeLegacyEndpoints"); var endpointArray = response.setArray("endpoints"); - EndpointList zoneEndpoints = controller.routing().readEndpointsOf(deploymentId) + EndpointList zoneEndpoints = controller.routing().endpointsOf(deploymentId) .scope(Endpoint.Scope.zone); if (!legacyEndpoints) { zoneEndpoints = zoneEndpoints.not().legacy(); @@ -1379,13 +1379,13 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler { for (var endpoint : controller.routing().directEndpoints(zoneEndpoints, deploymentId.applicationId())) { toSlime(endpoint, endpointArray.addObject()); } - // Add declared endpoints - EndpointList declaredEndpoints = controller.routing().declaredEndpointsOf(application) - .targets(deploymentId); + // Add global endpoints + EndpointList globalEndpoints = controller.routing().endpointsOf(application, deploymentId.applicationId().instance()) + .targets(deploymentId); if (!legacyEndpoints) { - declaredEndpoints = declaredEndpoints.not().legacy(); + globalEndpoints = globalEndpoints.not().legacy(); } - for (var endpoint : controller.routing().directEndpoints(declaredEndpoints, deploymentId.applicationId())) { + for (var endpoint : controller.routing().directEndpoints(globalEndpoints, deploymentId.applicationId())) { toSlime(endpoint, endpointArray.addObject()); } @@ -2061,7 +2061,7 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler { return new SlimeJsonResponse(testConfigSerializer.configSlime(id, type, false, - controller.routing().readZoneEndpointsOf(deployments), + controller.routing().zoneEndpointsOf(deployments), controller.applications().reachableContentClustersByZone(deployments))); } diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/routing/RoutingApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/routing/RoutingApiHandler.java index df4c31f49a1..50fccc19752 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/routing/RoutingApiHandler.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/routing/RoutingApiHandler.java @@ -96,7 +96,7 @@ public class RoutingApiHandler extends AuditLoggingRequestHandler { private HttpResponse endpoints(Path path) { var instanceId = instanceFrom(path); - var endpoints = controller.routing().readDeclaredEndpointsOf(instanceId) + var endpoints = controller.routing().endpointsOf(instanceId) .sortedBy(Comparator.comparing(Endpoint::name)) .asList(); diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/routing/RoutingPolicies.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/routing/RoutingPolicies.java index a11ea88a6a8..af3171181a2 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/routing/RoutingPolicies.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/routing/RoutingPolicies.java @@ -133,7 +133,7 @@ public class RoutingPolicies { Map<RoutingId, List<RoutingPolicy>> routingTable = instanceRoutingTable(routingPolicies); for (Map.Entry<RoutingId, List<RoutingPolicy>> routeEntry : routingTable.entrySet()) { RoutingId routingId = routeEntry.getKey(); - controller.routing().readDeclaredEndpointsOf(routingId.instance()) + controller.routing().endpointsOf(routingId.instance()) .named(routingId.endpointId()) .not().requiresRotation() .forEach(endpoint -> updateGlobalDnsOf(endpoint, inactiveZones, routeEntry.getValue())); @@ -211,8 +211,7 @@ public class RoutingPolicies { Map<String, Set<AliasTarget>> targetsByEndpoint = new LinkedHashMap<>(); for (Map.Entry<RoutingId, List<RoutingPolicy>> routeEntry : routingTable.entrySet()) { RoutingId routingId = routeEntry.getKey(); - EndpointList endpoints = controller.routing().readDeclaredEndpointsOf(routingId.application()) - .scope(Endpoint.Scope.application) + EndpointList endpoints = controller.routing().endpointsOf(routingId.application()) .named(routingId.endpointId()); if (endpoints.isEmpty()) continue; if (endpoints.size() > 1) { @@ -295,7 +294,7 @@ public class RoutingPolicies { Set<RoutingId> activeRoutingIds = instanceRoutingIds(allocation); removalCandidates.removeAll(activeRoutingIds); for (var id : removalCandidates) { - EndpointList endpoints = controller.routing().readDeclaredEndpointsOf(id.instance()) + EndpointList endpoints = controller.routing().endpointsOf(id.instance()) .not().requiresRotation() .named(id.endpointId()); NameServiceForwarder forwarder = nameServiceForwarderIn(allocation.deployment.zoneId()); @@ -316,7 +315,7 @@ public class RoutingPolicies { for (var id : removalCandidates) { TenantAndApplicationId application = TenantAndApplicationId.from(id.instance()); EndpointList endpoints = controller.routing() - .readDeclaredEndpointsOf(application) + .endpointsOf(application) .named(id.endpointId()); List<RoutingPolicy> policies = routingTable.get(id); for (var policy : policies) { |