Make panic threshold configurable for cluster#5118
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5118 +/- ##
==========================================
+ Coverage 66.81% 66.90% +0.08%
==========================================
Files 210 210
Lines 32988 32998 +10
==========================================
+ Hits 22042 22077 +35
+ Misses 9604 9583 -21
+ Partials 1342 1338 -4 ☔ View full report in Codecov by Sentry. |
api/v1alpha1/shared_types.go
Outdated
There was a problem hiding this comment.
my preference would be to add a PanicThreshold unit32 field inside HealthCheck supporting values between 0-100
gateway/api/v1alpha1/healthcheck_types.go
Line 17 in 0e52d06
internal/ir/xds.go
Outdated
There was a problem hiding this comment.
realistically it cannot be < 0 due to uint32 type
There was a problem hiding this comment.
Error: internal/ir/xds.go:2463:6: SA4003: no value of type uint32 is less than 0 (staticcheck)
if *h.PanicThreshold < 0 || *h.PanicThreshold > 100 {
CI is smart :)
internal/ir/xds_test.go
Outdated
There was a problem hiding this comment.
I should be able just to set it to nil
|
there is a failure for conformance test |
arkodg
left a comment
There was a problem hiding this comment.
LGTM thanks !
as a follow up can you add a test case in https://github.com/envoyproxy/gateway/tree/main/internal/xds/translator/testdata/in/xds-ir
internal/xds/translator/cluster.go
Outdated
There was a problem hiding this comment.
why is this set twice - here and below ?
There was a problem hiding this comment.
Good question, error while refactoring
zirain
left a comment
There was a problem hiding this comment.
Thanks, it would be better if you can add an e2e for this later.
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@docker.com>
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@docker.com>
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@docker.com>
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@docker.com>
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@docker.com>
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@docker.com>
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@docker.com>
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@docker.com>
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@docker.com>
a0de321 to
eb1631f
Compare
feat(api): Make panic threshold configurable per backend/cluster
Fixes #4015
Release Notes: TBD