aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2022-01-05 07:14:27 +0100
committerGitHub <noreply@github.com>2022-01-05 07:14:27 +0100
commit9e159e3ad5f6749d5ac948846bb70fd85247bc80 (patch)
tree76daf81502a4792fb0a946550830a0a62e72f400 /controller-server
parentc0ea1fd6befb2799e12777444bd3493c54363cd2 (diff)
Revert "Use InfrastructureApplication"
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/pom.xml7
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java30
2 files changed, 16 insertions, 21 deletions
diff --git a/controller-server/pom.xml b/controller-server/pom.xml
index fa4a0dc06d6..e9fadee58c7 100644
--- a/controller-server/pom.xml
+++ b/controller-server/pom.xml
@@ -70,13 +70,6 @@
<dependency>
<groupId>com.yahoo.vespa</groupId>
- <artifactId>application-model</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>com.yahoo.vespa</groupId>
<artifactId>vespa-athenz</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java
index 613422b2749..2819e382017 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/SystemApplication.java
@@ -3,11 +3,11 @@ package com.yahoo.vespa.hosted.controller.application;
import com.yahoo.component.Version;
import com.yahoo.config.provision.ApplicationId;
+import com.yahoo.config.provision.InstanceName;
import com.yahoo.config.provision.NodeType;
import com.yahoo.config.provision.TenantName;
import com.yahoo.config.provision.zone.ZoneId;
import com.yahoo.text.Text;
-import com.yahoo.vespa.applicationmodel.InfrastructureApplication;
import com.yahoo.vespa.hosted.controller.Controller;
import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId;
import com.yahoo.vespa.hosted.controller.api.integration.configserver.ServiceConvergence;
@@ -26,31 +26,33 @@ import java.util.Optional;
*/
public enum SystemApplication {
- controllerHost(InfrastructureApplication.CONTROLLER_HOST),
- configServerHost(InfrastructureApplication.CONFIG_SERVER_HOST),
- configServer(InfrastructureApplication.CONFIG_SERVER),
- proxyHost(InfrastructureApplication.PROXY_HOST),
- proxy(InfrastructureApplication.PROXY, proxyHost, configServer),
- tenantHost(InfrastructureApplication.TENANT_HOST);
+ controllerHost("controller-host", NodeType.controllerhost),
+ configServerHost("configserver-host", NodeType.confighost),
+ configServer("zone-config-servers", NodeType.config),
+ proxyHost("proxy-host", NodeType.proxyhost),
+ proxy( "routing", NodeType.proxy, proxyHost, configServer),
+ tenantHost("tenant-host", NodeType.host);
/** The tenant owning all system applications */
public static final TenantName TENANT = TenantName.from(Constants.TENANT_NAME);
- private final InfrastructureApplication application;
+ private final ApplicationId id;
+ private final NodeType nodeType;
private final List<SystemApplication> dependencies;
- SystemApplication(InfrastructureApplication application, SystemApplication... dependencies) {
- this.application = application;
+ SystemApplication(String application, NodeType nodeType, SystemApplication... dependencies) {
+ this.id = ApplicationId.from(Constants.TENANT_NAME, application, InstanceName.defaultName().value());
+ this.nodeType = nodeType;
this.dependencies = List.of(dependencies);
}
public ApplicationId id() {
- return application.id();
+ return id;
}
/** The node type that is implicitly allocated to this */
public NodeType nodeType() {
- return application.nodeType();
+ return nodeType;
}
/** Returns the system applications that should upgrade before this */
@@ -73,7 +75,7 @@ public enum SystemApplication {
/** Returns whether this should receive OS upgrades */
public boolean shouldUpgradeOs() {
- return nodeType().isHost();
+ return nodeType.isHost();
}
/** Returns whether this has an endpoint */
@@ -104,7 +106,7 @@ public enum SystemApplication {
@Override
public String toString() {
- return Text.format("system application %s of type %s", id(), nodeType());
+ return Text.format("system application %s of type %s", id, nodeType);
}
private static class Constants {