Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions source/server/config_validation/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,21 @@ void ValidationInstance::initialize(const Options& options,
// If we get all the way through that stripped-down initialization flow, to the point where we'd
// be ready to serve, then the config has passed validation.
// Handle configuration that needs to take place prior to the main configuration load.
envoy::config::bootstrap::v3::Bootstrap bootstrap;
InstanceUtil::loadBootstrapConfig(bootstrap, options,
InstanceUtil::loadBootstrapConfig(bootstrap_, options,
messageValidationContext().staticValidationVisitor(), *api_);

Config::Utility::createTagProducer(bootstrap);
bootstrap.mutable_node()->set_hidden_envoy_deprecated_build_version(VersionInfo::version());
Config::Utility::createTagProducer(bootstrap_);
bootstrap_.mutable_node()->set_hidden_envoy_deprecated_build_version(VersionInfo::version());

local_info_ = std::make_unique<LocalInfo::LocalInfoImpl>(
stats().symbolTable(), bootstrap.node(), bootstrap.node_context_params(), local_address,
stats().symbolTable(), bootstrap_.node(), bootstrap_.node_context_params(), local_address,
options.serviceZone(), options.serviceClusterName(), options.serviceNodeName());

overload_manager_ = std::make_unique<OverloadManagerImpl>(
dispatcher(), stats(), threadLocal(), bootstrap.overload_manager(),
dispatcher(), stats(), threadLocal(), bootstrap_.overload_manager(),
messageValidationContext().staticValidationVisitor(), *api_, options_);
Configuration::InitialImpl initial_config(bootstrap, options);
initial_config.initAdminAccessLog(bootstrap, *this);
Configuration::InitialImpl initial_config(bootstrap_, options);
initial_config.initAdminAccessLog(bootstrap_, *this);
admin_ = std::make_unique<Server::ValidationAdmin>(initial_config.admin().address());
listener_manager_ =
std::make_unique<ListenerManagerImpl>(*this, *this, *this, false, quic_stat_names_);
Expand All @@ -107,7 +106,7 @@ void ValidationInstance::initialize(const Options& options,
localInfo(), *secret_manager_, messageValidationContext(), *api_, http_context_,
grpc_context_, router_context_, accessLogManager(), singletonManager(), options,
quic_stat_names_);
config_.initialize(bootstrap, *this, *cluster_manager_factory_);
config_.initialize(bootstrap_, *this, *cluster_manager_factory_);
runtime().initialize(clusterManager());
clusterManager().setInitializedCb([this]() -> void { init_manager_.initialize(init_watcher_); });
}
Expand Down
3 changes: 2 additions & 1 deletion source/server/config_validation/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ValidationInstance final : Logger::Loggable<Logger::Id::main>,
bool enableReusePortDefault() override { return true; }

Configuration::StatsConfig& statsConfig() override { return config_.statsConfig(); }
envoy::config::bootstrap::v3::Bootstrap& bootstrap() override { NOT_IMPLEMENTED_GCOVR_EXCL_LINE; }
envoy::config::bootstrap::v3::Bootstrap& bootstrap() override { return bootstrap_; }
Configuration::ServerFactoryContext& serverFactoryContext() override { return server_contexts_; }
Configuration::TransportSocketFactoryContext& transportSocketFactoryContext() override {
return server_contexts_;
Expand Down Expand Up @@ -199,6 +199,7 @@ class ValidationInstance final : Logger::Loggable<Logger::Id::main>,
Event::DispatcherPtr dispatcher_;
std::unique_ptr<Server::ValidationAdmin> admin_;
Singleton::ManagerPtr singleton_manager_;
envoy::config::bootstrap::v3::Bootstrap bootstrap_;
std::unique_ptr<Runtime::ScopedLoaderSingleton> runtime_singleton_;
Random::RandomGeneratorImpl random_generator_;
std::unique_ptr<Ssl::ContextManager> ssl_context_manager_;
Expand Down