health_checker: Add request header options to GRPC health checker. (#20071)

Upstream GRPC hosts may categorize requests by request headers. This change exposes
request_headers_to_add and request_headers_to_remove options to GrpcHealthCheck in
a way similar to HttpHealthCheck.

Risk Level: Low
Testing: Performed manual test, a new unit test is added to cover the new code path.
Docs Changes: None
Release Notes: Added to "Minor Behavior Changes" section.

Signed-off-by: Wanli Li <wanlil@netflix.com>

Mirrored from https://github.com/envoyproxy/envoy @ 23ff23d0954eb9e6e4ed7ed60ec0e0d05174f6da
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent bc9e3dda11
commit 32bdf0bffc
  1. 6
      envoy/config/core/v3/health_check.proto

@ -186,6 +186,12 @@ message HealthCheck {
// the :ref:`hostname <envoy_v3_api_field_config.endpoint.v3.Endpoint.HealthCheckConfig.hostname>` field.
string authority = 2
[(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
// Specifies a list of key-value pairs that should be added to the metadata of each GRPC call
// that is sent to the health checked cluster. For more information, including details on header value syntax,
// see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated HeaderValueOption initial_metadata = 3 [(validate.rules).repeated = {max_items: 1000}];
}
// Custom health check.

Loading…
Cancel
Save