Skip to content

Commit

Permalink
envoy: update envoy ref and update config to v3 supported schema (#626)
Browse files Browse the repository at this point in the history
Description: this PR updates Envoy Mobile's Envoy ref past the point where Envoy internally uses v3 config. I took the chance to update Envoy Mobile's config and delete deprecated fields. Note that SAN verification changes, and thus it was removed here. I opened an issue tracking #630. Further note that this ref update significantly increased the binary size. It is a priority for the team to investigate and trim the binary ahead of the v0.3 release (noted in #447)
Risk Level: med boost to v3 config and deleted deprecated fields.
Testing: passing liveliness in CI and locally.

Signed-off-by: Jose Nino <[email protected]>
  • Loading branch information
junr03 authored Jan 13, 2020
1 parent 43d8192 commit bceee99
Show file tree
Hide file tree
Showing 6 changed files with 3,676 additions and 3,677 deletions.
2 changes: 1 addition & 1 deletion envoy
Submodule envoy updated 2833 files
7,318 changes: 3,659 additions & 3,659 deletions library/common/certificates.inc

Large diffs are not rendered by default.

28 changes: 15 additions & 13 deletions library/common/config_template.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ const char* config_template = R"(
- endpoint:
address:
socket_address: {address: {{ domain }}, port_value: 443}
tls_context: &base_tls_context
common_tls_context:
validation_context:
trusted_ca:
inline_string: |
transport_socket: &base_transport_socket
name: envoy.transport_sockets.tls
typed_config:
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3alpha.UpstreamTlsContext
common_tls_context:
validation_context:
trusted_ca:
inline_string: |
)"
#include "certificates.inc"
R"(
verify_subject_alt_name:
- {{ domain }}
sni: {{ domain }}
R"(
sni: {{ domain }}
type: LOGICAL_DNS
upstream_connection_options: &upstream_opts
tcp_keepalive:
Expand All @@ -41,7 +42,7 @@ R"(
load_assignment:
cluster_name: base_wlan
endpoints: *base_endpoints
tls_context: *base_tls_context
transport_socket: *base_transport_socket
type: LOGICAL_DNS
upstream_connection_options: *upstream_opts
- name: base_wwan # Note: the direct API depends on the existence of a cluster with this name.
Expand All @@ -52,7 +53,7 @@ R"(
load_assignment:
cluster_name: base_wwan
endpoints: *base_endpoints
tls_context: *base_tls_context
transport_socket: *base_transport_socket
type: LOGICAL_DNS
upstream_connection_options: *upstream_opts
- name: stats
Expand All @@ -67,12 +68,13 @@ R"(
- endpoint:
address:
socket_address: {address: {{ stats_domain }}, port_value: 443}
tls_context: *base_tls_context
transport_socket: *base_transport_socket
type: LOGICAL_DNS
stats_flush_interval: {{ stats_flush_interval_seconds }}s
stats_sinks:
- name: envoy.metrics_service
config:
typed_config:
"@type": type.googleapis.com/envoy.config.metrics.v3alpha.MetricsServiceConfig
grpc_service:
envoy_grpc:
cluster_name: stats
Expand Down
2 changes: 0 additions & 2 deletions library/common/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ static void registerFactories() {
Envoy::Extensions::NetworkFilters::HttpConnectionManager::
forceRegisterHttpConnectionManagerFilterConfigFactory();
Envoy::Extensions::StatSinks::MetricsService::forceRegisterMetricsServiceSinkFactory();
Envoy::Extensions::TransportSockets::RawBuffer::forceRegisterDownstreamRawBufferSocketFactory();
Envoy::Extensions::TransportSockets::RawBuffer::forceRegisterUpstreamRawBufferSocketFactory();
Envoy::Extensions::TransportSockets::Tls::forceRegisterUpstreamSslSocketFactory();
Envoy::Upstream::forceRegisterLogicalDnsClusterFactory();
}
Expand Down
1 change: 0 additions & 1 deletion library/common/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "extensions/filters/http/router/config.h"
#include "extensions/filters/network/http_connection_manager/config.h"
#include "extensions/stat_sinks/metrics_service/config.h"
#include "extensions/transport_sockets/raw_buffer/config.h"
#include "extensions/transport_sockets/tls/config.h"

#include "absl/base/call_once.h"
Expand Down
2 changes: 1 addition & 1 deletion test/common/http/dispatcher_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DispatcherTest : public testing::Test {
Router::ShadowWriterPtr{new NiceMock<Router::MockShadowWriter>()}, http_context_) {
http_dispatcher_.ready(event_dispatcher_, cm_);
ON_CALL(*cm_.conn_pool_.host_, locality())
.WillByDefault(ReturnRef(envoy::api::v2::core::Locality().default_instance()));
.WillByDefault(ReturnRef(envoy::config::core::v3alpha::Locality().default_instance()));
}

typedef struct {
Expand Down

0 comments on commit bceee99

Please sign in to comment.