Skip to content

Commit

Permalink
Support invalid HTTPRoute status
Browse files Browse the repository at this point in the history
Co-authored-by: Romain <[email protected]>
  • Loading branch information
kevinpollet and rtribotte authored May 22, 2024
1 parent 7fdb1ff commit 0e215f9
Show file tree
Hide file tree
Showing 7 changed files with 357 additions and 293 deletions.
2 changes: 0 additions & 2 deletions integration/k8s_conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,13 @@ func (s *K8sConformanceSuite) TestK8sGatewayAPIConformance() {
tests.GatewayInvalidTLSConfiguration.ShortName,
tests.HTTPRouteHostnameIntersection.ShortName,
tests.HTTPRouteListenerHostnameMatching.ShortName,
tests.HTTPRouteInvalidNonExistentBackendRef.ShortName,
tests.HTTPRouteInvalidReferenceGrant.ShortName,
tests.HTTPRouteInvalidCrossNamespaceParentRef.ShortName,
tests.HTTPRouteInvalidParentRefNotMatchingSectionName.ShortName,
tests.HTTPRouteInvalidCrossNamespaceBackendRef.ShortName,
tests.HTTPRouteMatchingAcrossRoutes.ShortName,
tests.HTTPRoutePartiallyInvalidViaInvalidReferenceGrant.ShortName,
tests.HTTPRouteRedirectHostAndStatus.ShortName,
tests.HTTPRouteInvalidBackendRefUnknownKind.ShortName,
tests.HTTPRoutePathMatchOrder.ShortName,
tests.HTTPRouteHeaderMatching.ShortName,
tests.HTTPRouteReferenceGrant.ShortName,
Expand Down
4 changes: 4 additions & 0 deletions pkg/config/dynamic/http_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions pkg/config/dynamic/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
rules:
- matches:
- path:
type: PathPrefix
type: Unsupported
value: /bar
backendRefs:
- name: whoami
Expand Down
Loading

0 comments on commit 0e215f9

Please sign in to comment.