Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make panic threshold configurable for cluster #5118

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

nezdolik
Copy link
Member

@nezdolik nezdolik commented Jan 21, 2025

feat(api): Make panic threshold configurable per backend/cluster
Fixes #4015

Release Notes: TBD

@nezdolik nezdolik requested a review from a team as a code owner January 21, 2025 11:47

if policy.Spec.CommonLbSettings != nil {
if lbSettings, err = buildCommonLbSettings(policy.Spec.CommonLbSettings); err != nil {
err = perr.WithMessage(err, "RateLimit")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oopsie

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 41.66667% with 7 lines in your changes missing coverage. Please review.

Project coverage is 66.90%. Comparing base (6731dfd) to head (702bf33).

Files with missing lines Patch % Lines
internal/xds/translator/cluster.go 0.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5118      +/-   ##
==========================================
- Coverage   66.92%   66.90%   -0.02%     
==========================================
  Files         210      210              
  Lines       32995    33006      +11     
==========================================
+ Hits        22081    22083       +2     
- Misses       9579     9587       +8     
- Partials     1335     1336       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -579,6 +579,22 @@ type ClusterSettings struct {
//
// +optional
HTTP2 *HTTP2Settings `json:"http2,omitempty"`

Copy link
Contributor

@arkodg arkodg Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my preference would be to add a PanicThreshold unit32 field inside HealthCheck supporting values between 0-100

type HealthCheck struct {

@arkodg arkodg modified the milestones: v1.3.0, v1.3.0-rc.1 Jan 21, 2025
@arkodg arkodg modified the milestones: v1.3.0-rc.1, Backlog Jan 22, 2025
@@ -2456,6 +2459,12 @@ func (h *HealthCheck) Validate() error {
}
}

if h.PanicThreshold != nil {
if *h.PanicThreshold < 0 || *h.PanicThreshold > 100 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

realistically it cannot be < 0 due to uint32 type

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 :)

@@ -1421,6 +1439,7 @@ func TestValidateHealthCheck(t *testing.T) {
},
},
&OutlierDetection{},
ptr.To[uint32](10),
Copy link
Member Author

@nezdolik nezdolik Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should be able just to set it to nil

@nezdolik nezdolik requested a review from arkodg January 23, 2025 15:23
Signed-off-by: Kateryna Nezdolii <[email protected]>
@nezdolik
Copy link
Member Author

there is a failure for conformance test --- FAIL: TestGatewayAPIConformance/HTTPRouteListenerPortMatching (72.08s) with not much additional info

arkodg
arkodg previously approved these changes Jan 23, 2025
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arkodg arkodg requested review from a team January 23, 2025 16:18
@arkodg arkodg modified the milestones: Backlog, v1.3.0-rc.1 Jan 23, 2025
Signed-off-by: Kateryna Nezdolii <[email protected]>
@arkodg arkodg removed this from the v1.3.0-rc.1 milestone Jan 23, 2025
@arkodg arkodg added this to the Backlog milestone Jan 23, 2025
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.

Panic threshold to be configurable
2 participants