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

BackendTrafficPolicy "Budget" fields should be in struct #3680

Open
robscott opened this issue Mar 13, 2025 · 0 comments
Open

BackendTrafficPolicy "Budget" fields should be in struct #3680

robscott opened this issue Mar 13, 2025 · 0 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. release-blocker MUST be completed to complete the milestone triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@robscott
Copy link
Member

What happened:
In today's SIG-Network review for v1.3, we got good feedback that budgetPercent and budgetInterval should really be in a struct to result in budget.percent and budget.interval. Particularly if we ever think that we'd add a third field with the same prefix.

What you expected to happen:
It would be worth moving the following fields into a struct:

// BudgetPercent defines the maximum percentage of active requests that may
// be made up of retries.
//
// Support: Extended
//
// +optional
// +kubebuilder:default=20
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=100
BudgetPercent *int `json:"budgetPercent,omitempty"`
// BudgetInterval defines the duration in which requests will be considered
// for calculating the budget for retries.
//
// Support: Extended
//
// +optional
// +kubebuilder:default="10s"
// +kubebuilder:validation:XValidation:message="budgetInterval can not be greater than one hour or less than one second",rule="!(duration(self) < duration('1s') || duration(self) > duration('1h'))"
BudgetInterval *Duration `json:"budgetInterval,omitempty"`

/cc @ericdbishop @mikemorris

@robscott robscott added the kind/bug Categorizes issue or PR as related to a bug. label Mar 13, 2025
@robscott robscott added this to the v1.3.0 milestone Mar 13, 2025
@robscott robscott added the release-blocker MUST be completed to complete the milestone label Mar 13, 2025
@shaneutt shaneutt added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. release-blocker MUST be completed to complete the milestone triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Development

No branches or pull requests

3 participants