summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2022-05-30 15:09:46 +0200
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:22 +0200
commit799145f6778ebb4aad9afa7c50fef88708c847ba (patch)
tree2ad59796c52c4ab6be1eabd2e373f8afbcf55a20 /config-model/src/main/java/com
parentae74da937bbafc034d2b9dd0271a0a86cd1364c8 (diff)
Remove support for 'aliases' element
Diffstat (limited to 'config-model/src/main/java/com')
-rwxr-xr-xconfig-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java8
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java33
2 files changed, 1 insertions, 40 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
index 17983553071..f9979eb5070 100755
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerCluster.java
@@ -142,8 +142,6 @@ public abstract class ContainerCluster<CONTAINER extends Container>
private final Set<Path> platformBundles = new LinkedHashSet<>();
- private final List<String> serviceAliases = new ArrayList<>();
- private final List<String> endpointAliases = new ArrayList<>();
private final ComponentGroup<Component<?, ?>> componentGroup;
private final boolean isHostedVespa;
private final boolean zooKeeperLocalhostAffinity;
@@ -616,12 +614,6 @@ public abstract class ContainerCluster<CONTAINER extends Container>
public Map<String, String> concreteDocumentTypes() { return concreteDocumentTypes; }
- /** The configured service aliases for the service in this cluster */
- public List<String> serviceAliases() { return serviceAliases; }
-
- /** The configured endpoint aliases (fqdn) for the service in this cluster */
- public List<String> endpointAliases() { return endpointAliases; }
-
public void setHostClusterId(String clusterId) { hostClusterId = clusterId; }
/**
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
index 8be949e226d..2b3ab4f15dd 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/xml/ContainerModelBuilder.java
@@ -26,16 +26,15 @@ import com.yahoo.config.provision.Capacity;
import com.yahoo.config.provision.ClusterMembership;
import com.yahoo.config.provision.ClusterResources;
import com.yahoo.config.provision.ClusterSpec;
-import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.HostName;
import com.yahoo.config.provision.NodeResources;
import com.yahoo.config.provision.NodeType;
import com.yahoo.config.provision.Zone;
import com.yahoo.container.logging.FileConnectionLog;
import com.yahoo.osgi.provider.model.ComponentModel;
-import com.yahoo.search.rendering.RendererRegistry;
import com.yahoo.schema.OnnxModel;
import com.yahoo.schema.derived.RankProfileList;
+import com.yahoo.search.rendering.RendererRegistry;
import com.yahoo.security.X509CertificateUtils;
import com.yahoo.text.XML;
import com.yahoo.vespa.defaults.Defaults;
@@ -207,7 +206,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
addHttp(deployState, spec, cluster, context);
addAccessLogs(deployState, cluster, spec);
- addRoutingAliases(cluster, spec, deployState.zone().environment());
addNodes(cluster, spec, context);
addClientProviders(deployState, spec, cluster);
@@ -359,21 +357,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
container.setProp("rotations", String.join(",", rotationsProperty));
}
- private void addRoutingAliases(ApplicationContainerCluster cluster, Element spec, Environment environment) {
- if (environment != Environment.prod) return;
-
- Element aliases = XML.getChild(spec, "aliases");
- if (aliases != null) {
- log.logApplicationPackage(WARNING, "The 'aliases' element and its children has no effect. They have been deprecated for removal in Vespa 8");
- }
- for (Element alias : XML.getChildren(aliases, "service-alias")) {
- cluster.serviceAliases().add(XML.getValue(alias));
- }
- for (Element alias : XML.getChildren(aliases, "endpoint-alias")) {
- cluster.endpointAliases().add(XML.getValue(alias));
- }
- }
-
private static void addEmbedderComponents(DeployState deployState, ApplicationContainerCluster cluster, Element spec) {
for (Element node : XML.getChildren(spec, "embedder")) {
Element transformed = EmbedderConfig.transform(deployState, node);
@@ -756,7 +739,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
List<ApplicationContainer> nodes = createNodes(cluster, containerElement, nodesElement, context);
extractJvmOptions(nodes, cluster, nodesElement, context);
- applyRoutingAliasProperties(nodes, cluster);
applyDefaultPreload(nodes, nodesElement);
String environmentVars = getEnvironmentVariables(XML.getChild(nodesElement, ENVIRONMENT_VARIABLES_ELEMENT));
if (!environmentVars.isEmpty()) {
@@ -791,19 +773,6 @@ public class ContainerModelBuilder extends ConfigModelBuilder<ContainerModel> {
else // the non-hosted option
return createNodesFromNodeList(context.getDeployState(), cluster, nodesElement);
}
-
- private static void applyRoutingAliasProperties(List<ApplicationContainer> result, ApplicationContainerCluster cluster) {
- if (!cluster.serviceAliases().isEmpty()) {
- result.forEach(container -> {
- container.setProp("servicealiases", cluster.serviceAliases().stream().collect(Collectors.joining(",")));
- });
- }
- if (!cluster.endpointAliases().isEmpty()) {
- result.forEach(container -> {
- container.setProp("endpointaliases", cluster.endpointAliases().stream().collect(Collectors.joining(",")));
- });
- }
- }
private static void applyMemoryPercentage(ApplicationContainerCluster cluster, String memoryPercentage) {
if (memoryPercentage == null || memoryPercentage.isEmpty()) return;