Skip to content

Support Hostname in HTTP Active Healthcheck #6116

Closed
@guydc

Description

@guydc

Description:
Currently, only method and path can be specified in Active Health Checks, added in #2244.

By default, envoy uses the cluster name/authority for active HTTP healthcheck hostname, https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/health_check.proto#envoy-v3-api-field-config-core-v3-healthcheck-httphealthcheck-host:

host
(string) 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. The host header can be customized for a specific endpoint by setting the hostname field.

Envoy Gateway auto-generates the hostname value in case it's absent and uses the route's virtual host hostname:

r.Traffic.HealthCheck.SetHTTPHostIfAbsent(r.Hostname)

However, the end user currently has no way to specify the hostname through configuration:

type HTTPActiveHealthChecker struct {

In some cases, the hostname must be rewritten to the target server's name or a different name altogether. EG can support this by explicitly exposing hostname for configuration in the active http healthcheck API.

[optional Relevant Links:]

Any extra documentation required to understand the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions