Add passive health checks

This commit is contained in:
Nelson Isioma
2025-08-21 10:40:06 +01:00
committed by GitHub
parent c20802b07e
commit fc0fac8543
20 changed files with 696 additions and 6 deletions
@@ -144,6 +144,8 @@ type LoadBalancerSpec struct {
NodePortLB bool `json:"nodePortLB,omitempty"`
// Healthcheck defines health checks for ExternalName services.
HealthCheck *ServerHealthCheck `json:"healthCheck,omitempty"`
// PassiveHealthCheck defines passive health checks for ExternalName services.
PassiveHealthCheck *PassiveServerHealthCheck `json:"passiveHealthCheck,omitempty"`
}
type ResponseForwarding struct {
@@ -189,6 +191,13 @@ type ServerHealthCheck struct {
Headers map[string]string `json:"headers,omitempty"`
}
type PassiveServerHealthCheck struct {
// FailureWindow defines the time window during which the failed attempts must occur for the server to be marked as unhealthy. It also defines for how long the server will be considered unhealthy.
FailureWindow *intstr.IntOrString `json:"failureWindow,omitempty"`
// MaxFailedAttempts is the number of consecutive failed attempts allowed within the failure window before marking the server as unhealthy.
MaxFailedAttempts *int `json:"maxFailedAttempts,omitempty"`
}
// Service defines an upstream HTTP service to proxy traffic to.
type Service struct {
LoadBalancerSpec `json:",inline"`