summaryrefslogtreecommitdiffstats
path: root/standalone-container
diff options
context:
space:
mode:
authorgjoranv <gv@oath.com>2018-04-17 11:43:02 +0200
committergjoranv <gv@oath.com>2018-04-17 11:48:03 +0200
commit4ed98d247a806fd0117f648ca23cb50e74a9f389 (patch)
treef647d60ce51c2fd796ec503185090397ccccb26a /standalone-container
parentb58cbe68e30c37cb67e4eb18e3a7a29a12722f1a (diff)
Handle VESPA_CONFIGSERVERS for standalone container.
Diffstat (limited to 'standalone-container')
-rw-r--r--standalone-container/src/main/scala/com/yahoo/container/standalone/CloudConfigInstallVariables.scala8
1 files changed, 7 insertions, 1 deletions
diff --git a/standalone-container/src/main/scala/com/yahoo/container/standalone/CloudConfigInstallVariables.scala b/standalone-container/src/main/scala/com/yahoo/container/standalone/CloudConfigInstallVariables.scala
index 363a1f6249c..c68ec29fb83 100644
--- a/standalone-container/src/main/scala/com/yahoo/container/standalone/CloudConfigInstallVariables.scala
+++ b/standalone-container/src/main/scala/com/yahoo/container/standalone/CloudConfigInstallVariables.scala
@@ -16,7 +16,7 @@ class CloudConfigInstallVariables extends CloudConfigOptions {
import CloudConfigInstallVariables._
override val rpcPort = optionalInstallVar[Integer]("port_configserver_rpc", "services")
- override val allConfigServers = installVar("addr_configserver", "services") withDefault Array[ConfigServer]()
+ override val allConfigServers = getConfigservers
override val multiTenant = optionalInstallVar[java.lang.Boolean]("multitenant")
override val zookeeperBarrierTimeout = optionalInstallVar[java.lang.Long]("zookeeper_barrier_timeout")
@@ -37,6 +37,12 @@ class CloudConfigInstallVariables extends CloudConfigOptions {
override val hostedVespa = optionalInstallVar[java.lang.Boolean]("hosted_vespa")
override val numParallelTenantLoaders = optionalInstallVar[java.lang.Integer]("num_parallel_tenant_loaders")
override val loadBalancerAddress = optionalInstallVar[java.lang.String]("load_balancer_address")
+
+ private def getConfigservers = {
+ val newVar = installVar("VESPA_CONFIGSERVERS", "services") withDefault Array[ConfigServer]()
+ val oldVar = installVar("addr_configserver", "services") withDefault Array[ConfigServer]()
+ if (newVar.nonEmpty) newVar else oldVar
+ }
}
object CloudConfigInstallVariables {