diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-06-26 17:38:08 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-06-26 17:38:08 +0200 |
commit | e49550176a0a000941412f874efd95b21e424183 (patch) | |
tree | e0aaf35c2d5225caca40568b88d01f61f387792c /config-model/src/main/java/com/yahoo/config/model/deploy | |
parent | 31bce0b6fea68f8551045f7aca8706bae1ff060d (diff) |
Don't fail on out of capacity on bootstrap
Diffstat (limited to 'config-model/src/main/java/com/yahoo/config/model/deploy')
-rw-r--r-- | config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java index d3e91f8866c..b259f6cf3fb 100644 --- a/config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java +++ b/config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java @@ -25,6 +25,7 @@ public class DeployProperties { private final String athenzDnsSuffix; private final boolean hostedVespa; private final Version vespaVersion; + private final boolean isBootstrap; private DeployProperties(boolean multitenant, ApplicationId applicationId, @@ -33,7 +34,8 @@ public class DeployProperties { boolean hostedVespa, URI ztsUrl, String athenzDnsSuffix, - Version vespaVersion) { + Version vespaVersion, + boolean isBootstrap) { this.loadBalancerName = loadBalancerName; this.ztsUrl = ztsUrl; this.athenzDnsSuffix = athenzDnsSuffix; @@ -42,9 +44,9 @@ public class DeployProperties { this.applicationId = applicationId; this.serverSpecs.addAll(configServerSpecs); this.hostedVespa = hostedVespa; + this.isBootstrap = isBootstrap; } - public boolean multitenant() { return multitenant; } @@ -78,6 +80,9 @@ public class DeployProperties { return vespaVersion; } + /** Returns whether this deployment happens during bootstrap *prepare* (not set on activate) */ + public boolean isBootstrap() { return isBootstrap; } + public static class Builder { private ApplicationId applicationId = ApplicationId.defaultId(); @@ -88,6 +93,7 @@ public class DeployProperties { private String athenzDnsSuffix; private boolean hostedVespa = false; private Version vespaVersion = Version.fromIntValues(1, 0, 0); + private boolean isBootstrap = false; public Builder applicationId(ApplicationId applicationId) { this.applicationId = applicationId; @@ -129,8 +135,13 @@ public class DeployProperties { return this; } + public Builder isBootstrap(boolean isBootstrap) { + this.isBootstrap = isBootstrap; + return this; + } + public DeployProperties build() { - return new DeployProperties(multitenant, applicationId, configServerSpecs, loadBalancerName, hostedVespa, ztsUrl, athenzDnsSuffix, vespaVersion); + return new DeployProperties(multitenant, applicationId, configServerSpecs, loadBalancerName, hostedVespa, ztsUrl, athenzDnsSuffix, vespaVersion, isBootstrap); } } |