Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ bind(
)

# When updating envoy sha manually please update the sha in istio.deps file also
ENVOY_SHA = "cb892b4855bc9e8516ca5eece8098f56f77fe522"
ENVOY_SHA = "f936fc60f488cfae07f5e5d20d7381f0f23482fe"

http_archive(
name = "envoy",
Expand Down
2 changes: 1 addition & 1 deletion include/istio/control/http/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ cc_library(
"request_handler.h",
],
visibility = ["//visibility:public"],
deps = ["//src/istio/authn:context_proto"],
deps = ["//src/istio/authn:context_proto_cc"],
)
2 changes: 1 addition & 1 deletion istio.deps
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"name": "ENVOY_SHA",
"repoName": "envoyproxy/envoy",
"file": "WORKSPACE",
"lastStableSHA": "cb892b4855bc9e8516ca5eece8098f56f77fe522"
"lastStableSHA": "f936fc60f488cfae07f5e5d20d7381f0f23482fe"
}
]
6 changes: 3 additions & 3 deletions src/envoy/http/authn/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ envoy_cc_library(
"//external:authentication_policy_config_cc_proto",
"//src/envoy/http/jwt_auth:jwt_lib",
"//src/envoy/utils:utils_lib",
"//src/istio/authn:context_proto",
"//src/istio/authn:context_proto_cc",
"//src/envoy/utils:filter_names_lib",
],
)
Expand All @@ -65,7 +65,7 @@ envoy_cc_library(
"//external:authentication_policy_config_cc_proto",
"//src/envoy/utils:authn_lib",
"//src/envoy/utils:utils_lib",
"//src/istio/authn:context_proto",
"//src/istio/authn:context_proto_cc",
"@envoy//source/exe:envoy_common_lib",
"//src/envoy/utils:filter_names_lib",
],
Expand All @@ -76,7 +76,7 @@ envoy_cc_test_library(
hdrs = ["test_utils.h"],
repository = "@envoy",
deps = [
"//src/istio/authn:context_proto",
"//src/istio/authn:context_proto_cc",
],
)

Expand Down
4 changes: 2 additions & 2 deletions src/envoy/http/mixer/control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ Control::Control(const Config& config, Upstream::ClusterManager& cm,
const LocalInfo::LocalInfo& local_info)
: config_(config),
check_client_factory_(Utils::GrpcClientFactoryForCluster(
config_.check_cluster(), cm, scope)),
config_.check_cluster(), cm, scope, dispatcher.timeSource())),
report_client_factory_(Utils::GrpcClientFactoryForCluster(
config_.report_cluster(), cm, scope)),
config_.report_cluster(), cm, scope, dispatcher.timeSource())),
stats_obj_(dispatcher, stats,
config_.config_pb().transport().stats_update_interval(),
[this](::istio::mixerclient::Statistics* stat) -> bool {
Expand Down
4 changes: 2 additions & 2 deletions src/envoy/tcp/mixer/control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Control::Control(const Config& config, Upstream::ClusterManager& cm,
: config_(config),
dispatcher_(dispatcher),
check_client_factory_(Utils::GrpcClientFactoryForCluster(
config_.check_cluster(), cm, scope)),
config_.check_cluster(), cm, scope, dispatcher.timeSource())),
report_client_factory_(Utils::GrpcClientFactoryForCluster(
config_.report_cluster(), cm, scope)),
config_.report_cluster(), cm, scope, dispatcher.timeSource())),
stats_obj_(dispatcher, stats,
config_.config_pb().transport().stats_update_interval(),
[this](Statistics* stat) -> bool { return GetStats(stat); }),
Expand Down
2 changes: 1 addition & 1 deletion src/envoy/utils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ envoy_cc_library(
deps = [
":utils_lib",
"//include/istio/utils:attribute_names_header",
"//src/istio/authn:context_proto",
"//src/istio/authn:context_proto_cc",
"//src/istio/utils:attribute_names_lib",
"//src/istio/utils:utils_lib",
":filter_names_lib",
Expand Down
13 changes: 8 additions & 5 deletions src/envoy/utils/mixer_control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,18 @@ class EnvoyTimer : public ::istio::mixerclient::Timer {
class EnvoyGrpcAsyncClientFactory : public Grpc::AsyncClientFactory {
public:
EnvoyGrpcAsyncClientFactory(Upstream::ClusterManager &cm,
envoy::api::v2::core::GrpcService config)
: cm_(cm), config_(config) {}
envoy::api::v2::core::GrpcService config,
TimeSource &time_source)
: cm_(cm), config_(config), time_source_(time_source) {}

Grpc::AsyncClientPtr create() override {
return std::make_unique<Grpc::AsyncClientImpl>(cm_, config_);
return std::make_unique<Grpc::AsyncClientImpl>(cm_, config_, time_source_);
}

private:
Upstream::ClusterManager &cm_;
envoy::api::v2::core::GrpcService config_;
TimeSource &time_source_;
};

inline bool ReadProtoMap(
Expand Down Expand Up @@ -110,13 +112,14 @@ void SerializeForwardedAttributes(

Grpc::AsyncClientFactoryPtr GrpcClientFactoryForCluster(
const std::string &cluster_name, Upstream::ClusterManager &cm,
Stats::Scope &scope) {
Stats::Scope &scope, TimeSource &time_source) {
envoy::api::v2::core::GrpcService service;
service.mutable_envoy_grpc()->set_cluster_name(cluster_name);

// Workaround for https://github.com/envoyproxy/envoy/issues/2762
UNREFERENCED_PARAMETER(scope);
return std::make_unique<EnvoyGrpcAsyncClientFactory>(cm, service);
return std::make_unique<EnvoyGrpcAsyncClientFactory>(cm, service,
time_source);
}

// This function is for compatibility with existing node ids.
Expand Down
2 changes: 1 addition & 1 deletion src/envoy/utils/mixer_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void SerializeForwardedAttributes(

Grpc::AsyncClientFactoryPtr GrpcClientFactoryForCluster(
const std::string &cluster_name, Upstream::ClusterManager &cm,
Stats::Scope &scope);
Stats::Scope &scope, TimeSource &time_source);

bool ExtractNodeInfo(const envoy::api::v2::core::Node &node,
::istio::utils::LocalNode *args);
Expand Down
2 changes: 1 addition & 1 deletion src/istio/control/http/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cc_library(
"//include/istio/control/http:headers_lib",
"//include/istio/utils:attribute_names_header",
"//src/istio/api_spec:api_spec_lib",
"//src/istio/authn:context_proto",
"//src/istio/authn:context_proto_cc",
"//src/istio/control:common_lib",
"//src/istio/utils:attribute_names_lib",
"//src/istio/utils:utils_lib",
Expand Down