Skip to content

Add hostname to BackendEndpoint #6280

@Ri7ay

Description

@Ri7ay

Description:
Currently, the BackendEndpoint resource in Envoy Gateway supports only an address IP and port, but does not include a distinct hostname field. This means that when an endpoint is specified by IP, Envoy’s auto_host_rewrite feature cannot rewrite the HTTP Host header, because there is no hostname to rewrite to.
We would like to add an optional hostname field to BackendEndpoint, so that users can:
Define an upstream by its IP address (for example, in cases where the service has no stable DNS name or uses private IPs).
Specify a hostname to be used as the HTTP Host header when auto_host_rewrite is enabled on the Envoy cluster.
With this addition, Envoy Gateway will:
Continue to route traffic to the specified IP address.
When auto_host_rewrite is set to true, inject the configured hostname into the outgoing HTTP request’s Host header.

It is proposed to add a hostname field to BackendEndpoint, similar to the proto type Envoy config.endpoint.v3.Endpoint.

[optional Relevant Links:]

https://gateway.envoyproxy.io/docs/api/extension_types/#backendendpoint
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/endpoint/v3/endpoint_components.proto

Metadata

Metadata

Assignees

Labels

area/apiAPI-related issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions