Package com.yahoo.config.application.api
Class DeploymentInstanceSpec
java.lang.Object
com.yahoo.config.application.api.DeploymentSpec.Step
com.yahoo.config.application.api.DeploymentSpec.Steps
com.yahoo.config.application.api.DeploymentInstanceSpec
The deployment spec for an application instance
- Author:
- bratseth
-
Constructor Summary
ConstructorsConstructorDescriptionDeploymentInstanceSpec(com.yahoo.config.provision.InstanceName name, com.yahoo.config.provision.Tags tags, List<DeploymentSpec.Step> steps, DeploymentSpec.UpgradePolicy upgradePolicy, DeploymentSpec.RevisionTarget revisionTarget, DeploymentSpec.RevisionChange revisionChange, DeploymentSpec.UpgradeRollout upgradeRollout, int minRisk, int maxRisk, int maxIdleHours, List<DeploymentSpec.ChangeBlocker> changeBlockers, Optional<com.yahoo.config.provision.AthenzService> athenzService, Map<com.yahoo.config.provision.CloudName, com.yahoo.config.provision.CloudAccount> cloudAccounts, Optional<Duration> hostTTL, Notifications notifications, List<Endpoint> endpoints, Map<com.yahoo.config.provision.ClusterSpec.Id, Map<com.yahoo.config.provision.zone.ZoneId, com.yahoo.config.provision.ZoneEndpoint>> zoneEndpoints, Bcp bcp, Instant now) -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.yahoo.config.provision.AthenzService>athenzService(com.yahoo.config.provision.Environment environment, com.yahoo.config.provision.RegionName region) Returns the athenz service for environment/region if configured, defaulting to that of the instancebcp()Returns the BCP spec of this instance, or BcpSpec.empty() if none.booleancanChangeRevisionAt(Instant instant) Returns whether an application revision change for these instances can occur at the given instantbooleancanUpgradeAt(Instant instant) Returns whether the instances in this step can upgrade at the given instantReturns time windows where upgrades are disallowed for these instancesMap<com.yahoo.config.provision.CloudName,com.yahoo.config.provision.CloudAccount> cloudAccounts(com.yahoo.config.provision.Environment environment, com.yahoo.config.provision.RegionName region) Returns the cloud accounts to use for given environment and region, if anybooleandeploysTo(com.yahoo.config.provision.Environment environment, com.yahoo.config.provision.RegionName region) Returns whether this instance deploys to the given zone, either implicitly or explicitlyReturns the rotations configuration of these instancesbooleaninthashCode()hostTTL(com.yahoo.config.provision.Environment environment, Optional<com.yahoo.config.provision.RegionName> region) Returns the host TTL to use for given environment and region, if anyintintmaxRisk()Maximum cumulative risk that will automatically roll out to this instance, as long as this is possible. 0 by default.intminRisk()Minimum cumulative, enqueued risk required for a new revision to roll out to this instance. 0 by default.com.yahoo.config.provision.InstanceNamename()Returns the notification configuration of these instancesReturns the revision change strategy of this, which isDeploymentSpec.RevisionChange.whenFailingby defaultReturns the revision target choice of this, which isDeploymentSpec.RevisionTarget.latestby defaulttoString()Returns the upgrade policy of this, which isDeploymentSpec.UpgradePolicy.defaultPolicyby defaultReturns the upgrade rollout strategy of this, which isDeploymentSpec.UpgradeRollout.separateby defaultMap<com.yahoo.config.provision.ClusterSpec.Id,com.yahoo.config.provision.ZoneEndpoint> zoneEndpoints(com.yahoo.config.provision.zone.ZoneId zone) The zone endpoints in the given zone, possibly default values.Methods inherited from class com.yahoo.config.application.api.DeploymentSpec.Steps
concerns, delay, steps, zonesMethods inherited from class com.yahoo.config.application.api.DeploymentSpec.Step
concerns, hostTTL, isOrdered, isTest
-
Constructor Details
-
DeploymentInstanceSpec
public DeploymentInstanceSpec(com.yahoo.config.provision.InstanceName name, com.yahoo.config.provision.Tags tags, List<DeploymentSpec.Step> steps, DeploymentSpec.UpgradePolicy upgradePolicy, DeploymentSpec.RevisionTarget revisionTarget, DeploymentSpec.RevisionChange revisionChange, DeploymentSpec.UpgradeRollout upgradeRollout, int minRisk, int maxRisk, int maxIdleHours, List<DeploymentSpec.ChangeBlocker> changeBlockers, Optional<com.yahoo.config.provision.AthenzService> athenzService, Map<com.yahoo.config.provision.CloudName, com.yahoo.config.provision.CloudAccount> cloudAccounts, Optional<Duration> hostTTL, Notifications notifications, List<Endpoint> endpoints, Map<com.yahoo.config.provision.ClusterSpec.Id, Map<com.yahoo.config.provision.zone.ZoneId, com.yahoo.config.provision.ZoneEndpoint>> zoneEndpoints, Bcp bcp, Instant now)
-
-
Method Details
-
name
public com.yahoo.config.provision.InstanceName name() -
upgradePolicy
Returns the upgrade policy of this, which isDeploymentSpec.UpgradePolicy.defaultPolicyby default -
revisionTarget
Returns the revision target choice of this, which isDeploymentSpec.RevisionTarget.latestby default -
revisionChange
Returns the revision change strategy of this, which isDeploymentSpec.RevisionChange.whenFailingby default -
upgradeRollout
Returns the upgrade rollout strategy of this, which isDeploymentSpec.UpgradeRollout.separateby default -
minRisk
public int minRisk()Minimum cumulative, enqueued risk required for a new revision to roll out to this instance. 0 by default. -
maxRisk
public int maxRisk()Maximum cumulative risk that will automatically roll out to this instance, as long as this is possible. 0 by default. -
maxIdleHours
public int maxIdleHours() -
changeBlocker
Returns time windows where upgrades are disallowed for these instances -
canUpgradeAt
Returns whether the instances in this step can upgrade at the given instant -
canChangeRevisionAt
Returns whether an application revision change for these instances can occur at the given instant -
athenzService
public Optional<com.yahoo.config.provision.AthenzService> athenzService(com.yahoo.config.provision.Environment environment, com.yahoo.config.provision.RegionName region) Returns the athenz service for environment/region if configured, defaulting to that of the instance -
cloudAccounts
public Map<com.yahoo.config.provision.CloudName,com.yahoo.config.provision.CloudAccount> cloudAccounts(com.yahoo.config.provision.Environment environment, com.yahoo.config.provision.RegionName region) Returns the cloud accounts to use for given environment and region, if any -
hostTTL
public Optional<Duration> hostTTL(com.yahoo.config.provision.Environment environment, Optional<com.yahoo.config.provision.RegionName> region) Returns the host TTL to use for given environment and region, if any -
notifications
Returns the notification configuration of these instances -
endpoints
Returns the rotations configuration of these instances -
bcp
Returns the BCP spec of this instance, or BcpSpec.empty() if none. -
deploysTo
public boolean deploysTo(com.yahoo.config.provision.Environment environment, com.yahoo.config.provision.RegionName region) Returns whether this instance deploys to the given zone, either implicitly or explicitly -
zoneEndpoints
public Map<com.yahoo.config.provision.ClusterSpec.Id,com.yahoo.config.provision.ZoneEndpoint> zoneEndpoints(com.yahoo.config.provision.zone.ZoneId zone) The zone endpoints in the given zone, possibly default values. -
equals
- Overrides:
equalsin classDeploymentSpec.Steps
-
hashCode
public int hashCode()- Overrides:
hashCodein classDeploymentSpec.Steps
-
toString
- Overrides:
toStringin classDeploymentSpec.Steps
-