1
0
Fork 0

Support invalid HTTPRoute status

Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
Kevin Pollet 2024-05-22 17:20:04 +02:00 committed by GitHub
parent 7fdb1ff8af
commit 0e215f9b61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 361 additions and 297 deletions

View file

@ -128,6 +128,10 @@ type WeightedRoundRobin struct {
type WRRService struct {
Name string `json:"name,omitempty" toml:"name,omitempty" yaml:"name,omitempty" export:"true"`
Weight *int `json:"weight,omitempty" toml:"weight,omitempty" yaml:"weight,omitempty" export:"true"`
// Status defines an HTTP status code that should be returned when calling the service.
// This is required by the Gateway API implementation which expects specific HTTP status to be returned.
Status *int `json:"-" toml:"-" yaml:"-" label:"-" file:"-"`
}
// SetDefaults Default values for a WRRService.

View file

@ -2187,6 +2187,11 @@ func (in *WRRService) DeepCopyInto(out *WRRService) {
*out = new(int)
**out = **in
}
if in.Status != nil {
in, out := &in.Status, &out.Status
*out = new(int)
**out = **in
}
return
}