Skip to content

feat(meshhealthcheck): support unhealthyInterval - #18229

Open
abhyudayareddy wants to merge 1 commit into
kumahq:masterfrom
abhyudayareddy:feat/meshhealthcheck-unhealthy-interval-17129
Open

abhyudayareddy wants to merge 1 commit into
kumahq:masterfrom
abhyudayareddy:feat/meshhealthcheck-unhealthy-interval-17129

Conversation

@abhyudayareddy

Copy link
Copy Markdown

Motivation

Envoy's health check config has unhealthy_interval — a separate probe interval used while an endpoint is marked unhealthy, distinct from the normal interval. MeshHealthCheck currently exposes interval, intervalJitter, intervalJitterPercent and noTrafficInterval, but not unhealthyInterval, so there was no way to probe unhealthy hosts on a different cadence.

This came up in #17129: users configuring it via ProxyTemplate on older Kuma had no equivalent after moving onto MeshHealthCheck. It was also already listed in the L4 health-check proposal (docs/proposals/HealthChecks-L4.md) but never wired up.

Implementation information

  • New optional unhealthyInterval (*k8s.Duration) on the policy Conf, placed next to interval.
  • Validated like the other durations — must be greater than zero when set.
  • Passed straight through to the Envoy HealthCheck in the xDS configurer. When unset, Envoy keeps its current behaviour of falling back to interval, so this is fully backward compatible.
  • Regenerated the dependent files (zz_generated.deepcopy.go, CRDs, rest.yaml, bundled OpenAPI, kumactl install goldens) with controller-gen v0.21.0 / policy-gen.
  • Tests: extended the validator negative-duration case, added unhealthyInterval to the HTTP health-check plugin entry, and refreshed the two affected xDS golden files (they now show unhealthyInterval: 17s in the emitted cluster).

make test TEST_PKG_LIST=./pkg/plugins/policies/meshhealthcheck/... passes locally. My local toolchain is a minor version behind the repo's pinned Go/golangci-lint, so if the generated-file or lint checks flag anything in CI a maintainer /golden_files + /format pass should sort it.

Supporting documentation

Closes #17129

Envoy's health check config exposes 'unhealthy_interval', a separate
probe interval used while an endpoint is unhealthy, distinct from the
normal 'interval'. MeshHealthCheck had no way to set it, so users
migrating off ProxyTemplate onto MeshHealthCheck lost that control
(kumahq#17129). The field was also already sketched in the L4 health check
proposal but never wired up.

Add an optional 'unhealthyInterval' to the policy Conf, validate it the
same way as the other durations (> 0 when set), and pass it through to
the Envoy HealthCheck. When unset Envoy keeps its existing behaviour of
falling back to 'interval'.

Closes kumahq#17129

Signed-off-by: Abhyuday <abhyudayareddy@gmail.com>
@abhyudayareddy
abhyudayareddy requested a review from a team as a code owner August 28, 2026 01:53
@abhyudayareddy

Copy link
Copy Markdown
Author

cc @slonka @kongmesh — this has been open a couple weeks with no review yet (feat: support unhealthyInterval for MeshHealthCheck). DCO is green. Happy to make any adjustments if needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(MeshHealthCheck): add unhealthy_interval support

1 participant