use of com.yahoo.config.provision.SystemName in project vespa by vespa-engine.
the class ConfigserverCluster method setContainerCluster.
public void setContainerCluster(ContainerCluster containerCluster) {
this.containerCluster = containerCluster;
// If we are in a config server cluster the correct zone is propagated through cloud config options,
// not through config to deployment options (see StandaloneContainerApplication.scala),
// so we need to propagate the zone options into the container from here
Environment environment = options.environment().isPresent() ? Environment.from(options.environment().get()) : Environment.defaultEnvironment();
RegionName region = options.region().isPresent() ? RegionName.from(options.region().get()) : RegionName.defaultName();
SystemName system = options.system().isPresent() ? SystemName.from(options.system().get()) : SystemName.defaultSystem();
containerCluster.setZone(new Zone(system, environment, region));
}
Aggregations