eds: introduce hostname for endpoints and health checks (#10456)

Allow using a custom host name for endpoints and health checks. This enables auto host re-write to work with EDS

Risk Level: Low, new opt in field.
Testing: Unit tests
Docs Changes: inline docs in the protocs.
Release Notes: added to version_history.rst

Fixes #10408

Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ b5a3405b2725e979a93e7410fce7c57a0c66d8db
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 508b7d4fb9
commit f35a1d3d6f
  1. 6
      envoy/api/v2/core/health_check.proto
  2. 13
      envoy/api/v2/endpoint/endpoint_components.proto
  3. 6
      envoy/config/core/v3/health_check.proto
  4. 13
      envoy/config/endpoint/v3/endpoint_components.proto

@ -74,7 +74,8 @@ message HealthCheck {
message HttpHealthCheck {
// The value of the host header in the HTTP health check request. If
// left empty (default value), the name of the cluster this health check is associated
// with will be used.
// with will be used. The host header can be customized for a specific endpoint by setting the
// :ref:`hostname <envoy_api_field_endpoint.Endpoint.HealthCheckConfig.hostname>` field.
string host = 1;
// Specifies the HTTP path that will be requested during health checking. For example
@ -161,7 +162,8 @@ message HealthCheck {
// The value of the :authority header in the gRPC health check request. If
// left empty (default value), the name of the cluster this health check is associated
// with will be used.
// with will be used. The authority header can be customized for a specific endpoint by setting
// the :ref:`hostname <envoy_api_field_endpoint.Endpoint.HealthCheckConfig.hostname>` field.
string authority = 2;
}

@ -31,6 +31,13 @@ message Endpoint {
// check port. Setting this with a non-zero value allows an upstream host
// to have different health check address port.
uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}];
// By default, the host header for L7 health checks is controlled by cluster level configuration
// (see: :ref:`host <envoy_api_field_core.HealthCheck.HttpHealthCheck.host>` and
// :ref:`authority <envoy_api_field_core.HealthCheck.GrpcHealthCheck.authority>`). Setting this
// to a non-empty value allows overriding the cluster level configuration for a specific
// endpoint.
string hostname = 2;
}
// The upstream host address.
@ -52,6 +59,12 @@ message Endpoint {
// This takes into effect only for upstream clusters with
// :ref:`active health checking <arch_overview_health_checking>` enabled.
HealthCheckConfig health_check_config = 2;
// The hostname associated with this endpoint. This hostname is not used for routing or address
// resolution. If provided, it will be associated with the endpoint, and can be used for features
// that require a hostname, like
// :ref:`auto_host_rewrite <envoy_api_field_route.RouteAction.auto_host_rewrite>`.
string hostname = 3;
}
// An Endpoint that Envoy can route traffic to.

@ -85,7 +85,8 @@ message HealthCheck {
// The value of the host header in the HTTP health check request. If
// left empty (default value), the name of the cluster this health check is associated
// with will be used.
// with will be used. The host header can be customized for a specific endpoint by setting the
// :ref:`hostname <envoy_api_field_config.endpoint.v3.Endpoint.HealthCheckConfig.hostname>` field.
string host = 1;
// Specifies the HTTP path that will be requested during health checking. For example
@ -166,7 +167,8 @@ message HealthCheck {
// The value of the :authority header in the gRPC health check request. If
// left empty (default value), the name of the cluster this health check is associated
// with will be used.
// with will be used. The authority header can be customized for a specific endpoint by setting
// the :ref:`hostname <envoy_api_field_config.endpoint.v3.Endpoint.HealthCheckConfig.hostname>` field.
string authority = 2;
}

@ -35,6 +35,13 @@ message Endpoint {
// check port. Setting this with a non-zero value allows an upstream host
// to have different health check address port.
uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}];
// By default, the host header for L7 health checks is controlled by cluster level configuration
// (see: :ref:`host <envoy_api_field_config.core.v3.HealthCheck.HttpHealthCheck.host>` and
// :ref:`authority <envoy_api_field_config.core.v3.HealthCheck.GrpcHealthCheck.authority>`). Setting this
// to a non-empty value allows overriding the cluster level configuration for a specific
// endpoint.
string hostname = 2;
}
// The upstream host address.
@ -56,6 +63,12 @@ message Endpoint {
// This takes into effect only for upstream clusters with
// :ref:`active health checking <arch_overview_health_checking>` enabled.
HealthCheckConfig health_check_config = 2;
// The hostname associated with this endpoint. This hostname is not used for routing or address
// resolution. If provided, it will be associated with the endpoint, and can be used for features
// that require a hostname, like
// :ref:`auto_host_rewrite <envoy_api_field_config.route.v3.RouteAction.auto_host_rewrite>`.
string hostname = 3;
}
// An Endpoint that Envoy can route traffic to.

Loading…
Cancel
Save