summaryrefslogtreecommitdiffstats
path: root/config-provisioning
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@yahooinc.com>2023-10-17 13:05:02 +0200
committerHåkon Hallingstad <hakon@yahooinc.com>2023-10-17 13:05:02 +0200
commit200c93d92fd29c68efba1129eba925f3decbd3c3 (patch)
treed58ad6a98b4f0caa100078f6711695c93458c765 /config-provisioning
parentdcbef25fe2c582224070d966ea292ef778c2522b (diff)
Align ClusterSpec::exclusive with CapacityPolicies::decideExclusivity and HostSharing.provision
Diffstat (limited to 'config-provisioning')
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java24
1 files changed, 6 insertions, 18 deletions
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java b/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java
index 04aced68d1b..877a94a4af3 100644
--- a/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/ClusterSpec.java
@@ -22,21 +22,19 @@ public final class ClusterSpec {
private final Version vespaVersion;
private final boolean exclusive;
- private final boolean provisionForApplication;
private final Optional<Id> combinedId;
private final Optional<DockerImage> dockerImageRepo;
private final ZoneEndpoint zoneEndpoint;
private final boolean stateful;
private ClusterSpec(Type type, Id id, Optional<Group> groupId, Version vespaVersion, boolean exclusive,
- boolean provisionForApplication, Optional<Id> combinedId, Optional<DockerImage> dockerImageRepo,
+ Optional<Id> combinedId, Optional<DockerImage> dockerImageRepo,
ZoneEndpoint zoneEndpoint, boolean stateful) {
this.type = type;
this.id = id;
this.groupId = groupId;
this.vespaVersion = Objects.requireNonNull(vespaVersion, "vespaVersion cannot be null");
this.exclusive = exclusive;
- this.provisionForApplication = provisionForApplication;
if (type == Type.combined) {
if (combinedId.isEmpty()) throw new IllegalArgumentException("combinedId must be set for cluster of type " + type);
} else {
@@ -79,28 +77,19 @@ public final class ClusterSpec {
return combinedId;
}
- /**
- * Returns whether the physical hosts running the nodes of this application can
- * also run nodes of other applications. Using exclusive nodes for containers increases security and cost.
- */
- public boolean isExclusive() { return exclusive; }
/** Returns whether the physical hosts must be provisioned specifically for this application. */
- public boolean provisionForApplication() { return provisionForApplication; }
+ public boolean isExclusive() { return exclusive; }
/** Returns whether this cluster has state */
public boolean isStateful() { return stateful; }
public ClusterSpec with(Optional<Group> newGroup) {
- return new ClusterSpec(type, id, newGroup, vespaVersion, exclusive, provisionForApplication, combinedId, dockerImageRepo, zoneEndpoint, stateful);
+ return new ClusterSpec(type, id, newGroup, vespaVersion, exclusive, combinedId, dockerImageRepo, zoneEndpoint, stateful);
}
public ClusterSpec withExclusivity(boolean exclusive) {
- return new ClusterSpec(type, id, groupId, vespaVersion, exclusive, provisionForApplication, combinedId, dockerImageRepo, zoneEndpoint, stateful);
- }
-
- public ClusterSpec withProvisionForApplication(boolean provisionForApplication) {
- return new ClusterSpec(type, id, groupId, vespaVersion, exclusive, provisionForApplication, combinedId, dockerImageRepo, zoneEndpoint, stateful);
+ return new ClusterSpec(type, id, groupId, vespaVersion, exclusive, combinedId, dockerImageRepo, zoneEndpoint, stateful);
}
/** Creates a ClusterSpec when requesting a cluster */
@@ -134,7 +123,7 @@ public final class ClusterSpec {
}
public ClusterSpec build() {
- return new ClusterSpec(type, id, groupId, vespaVersion, exclusive, provisionForApplication, combinedId, dockerImageRepo, zoneEndpoint, stateful);
+ return new ClusterSpec(type, id, groupId, vespaVersion, exclusive, combinedId, dockerImageRepo, zoneEndpoint, stateful);
}
public Builder group(Group groupId) {
@@ -195,7 +184,6 @@ public final class ClusterSpec {
if (o == null || getClass() != o.getClass()) return false;
ClusterSpec that = (ClusterSpec) o;
return exclusive == that.exclusive &&
- provisionForApplication == that.provisionForApplication &&
stateful == that.stateful &&
type == that.type &&
id.equals(that.id) &&
@@ -208,7 +196,7 @@ public final class ClusterSpec {
@Override
public int hashCode() {
- return Objects.hash(type, id, groupId, vespaVersion, exclusive, provisionForApplication, combinedId, dockerImageRepo, zoneEndpoint, stateful);
+ return Objects.hash(type, id, groupId, vespaVersion, exclusive, combinedId, dockerImageRepo, zoneEndpoint, stateful);
}
/**