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

api: make BackendRef.Weight default to match GWAPI #156

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions api/v1alpha1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,12 @@ type AIGatewayRouteRuleBackendRef struct {
// the BackendRef in the Gateway API. See for the details:
// https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io%2fv1.BackendRef
//
// +kubebuilder:validation:Required
// Default is 1.
//
// +optional
// +kubebuilder:validation:Minimum=0
Weight int `json:"weight"`
// +kubebuilder:default=1
Weight int `json:"weight,omitempty"`
}

type AIGatewayRouteRuleMatch struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,17 @@ spec:
minLength: 1
type: string
weight:
default: 1
description: |-
Weight is the weight of the AIServiceBackend. This is exactly the same as the weight in
the BackendRef in the Gateway API. See for the details:
https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io%2fv1.BackendRef

Default is 1.
minimum: 0
type: integer
required:
- name
- weight
type: object
maxItems: 128
type: array
Expand Down
Loading