feat(meshhealthcheck): support unhealthyInterval - #18229
Open
abhyudayareddy wants to merge 1 commit into
Open
abhyudayareddy wants to merge 1 commit into
abhyudayareddy wants to merge 1 commit into
Conversation
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>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Envoy's health check config has
unhealthy_interval— a separate probe interval used while an endpoint is marked unhealthy, distinct from the normalinterval.MeshHealthCheckcurrently exposesinterval,intervalJitter,intervalJitterPercentandnoTrafficInterval, but notunhealthyInterval, so there was no way to probe unhealthy hosts on a different cadence.This came up in #17129: users configuring it via
ProxyTemplateon older Kuma had no equivalent after moving ontoMeshHealthCheck. It was also already listed in the L4 health-check proposal (docs/proposals/HealthChecks-L4.md) but never wired up.Implementation information
unhealthyInterval(*k8s.Duration) on the policyConf, placed next tointerval.HealthCheckin the xDS configurer. When unset, Envoy keeps its current behaviour of falling back tointerval, so this is fully backward compatible.zz_generated.deepcopy.go, CRDs,rest.yaml, bundled OpenAPI, kumactl install goldens) withcontroller-gen v0.21.0/policy-gen.unhealthyIntervalto the HTTP health-check plugin entry, and refreshed the two affected xDS golden files (they now showunhealthyInterval: 17sin 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+/formatpass should sort it.Supporting documentation
docs/proposals/HealthChecks-L4.md(listsunhealthyInterval)Closes #17129