envoyproxy / envoyproxy/gateway
Support HealthCheckConfig to Backend Endpoint for Fine-Grained Health Check Configuration
- Dominant language
- Go
- Stars
- 3k
- Forks
- 864
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 140
Description
*Description*:
Currently, Envoy Gateway allows configuring health checks at a cluster level, but backend endpoints themselves cannot define endpoint-specific health check parameters. This feature request proposes adding a new HealthCheckConfig struct to the backend endpoint specification, enabling fine-grained control of health checks for individual endpoints.
*API Change*
New field in BackendEndpoint struct:
```
type HealthCheckConfig struct {
// Optional flag to control if perform active health check for this endpoint. Defaults to false.
//
// +optional
// +kubebuilder:default=false
DisableHealthCheck bool `json:"disableHealthCheck,omitempty"`
// Hostname that overrides endpoint's cluster level host/authority header configuration
//
// +optional
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
Hostname *string `json:"hostname,omitempty"`
// Optional alternative health check port value
//
// +optional
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=65535
Port *int32 `json:"port,omitempty"`
}
```
*Rationale*:
Many production environments require different health check behaviors for endpoints within the same backend cluster:
* Some endpoints may be passive-only (no active health check) due to resource constraints or third-party service restrictions.
* Some endpoints may require a different health check hostname to align with TLS certificates or virtual host routing.
* Some endpoints may listen on a dedicated port for health checks that differs from the main service port.
Adding this configuration per endpoint provides flexibility without impacting the entire cluster.
[optional *Relevant Links*:]
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/endpoint/v3/endpoint_components.proto#config-endpoint-v3-endpoint-healthcheckconfig
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.