Skip to content

BackendTrafficPolicy "Budget" fields should be in struct #3680

@robscott

Description

@robscott

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

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.release-blockerMUST be completed to complete the milestonetriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions