aboutsummaryrefslogtreecommitdiffstats
path: root/node-repository
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@yahooinc.com>2023-05-10 14:51:02 +0200
committerHåkon Hallingstad <hakon@yahooinc.com>2023-05-10 14:51:02 +0200
commit8b89051578e85d0c6b2928a849c5ab26f93014e4 (patch)
treeb61dd94bdd54767a5048d2d438140b5d7f1f99e1 /node-repository
parent2d11f545108d46dc6ae2aff098892f5462f2cefc (diff)
Depend on application-model instead
Diffstat (limited to 'node-repository')
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/lb/LoadBalancer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/lb/LoadBalancer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/lb/LoadBalancer.java
index c8b8b55b5ea..74f2225adb5 100644
--- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/lb/LoadBalancer.java
+++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/lb/LoadBalancer.java
@@ -1,6 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.lb;
+import com.yahoo.vespa.applicationmodel.InfrastructureApplication;
import com.yahoo.vespa.hosted.provision.maintenance.LoadBalancerExpirer;
import com.yahoo.vespa.service.duper.ConfigServerApplication;
@@ -29,7 +30,7 @@ public class LoadBalancer {
if (state == State.active && instance.isEmpty()) {
throw new IllegalArgumentException("Load balancer instance is required in state " + state);
}
- if (id.application().equals(new ConfigServerApplication().getApplicationId()) &&
+ if (id.application().equals(InfrastructureApplication.CONFIG_SERVER.id()) &&
Set.of(State.inactive, State.removable).contains(state)) {
throw new IllegalArgumentException("The config server load balancer is managed by Terraform - therefore the state cannot be '" + state + "'");
}