Skip to content

Commit

Permalink
HTTPBackendRef Filter HTTPRouteFilterRequestRedirect conformance test
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-tincelin committed Jun 4, 2024
1 parent e50fd3b commit f6689f5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Empty file added conformance/tests/http
Empty file.
22 changes: 22 additions & 0 deletions conformance/tests/httproute-filter-request-redirect.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: filter-request-redirect
namespace: gateway-conformance-infra
spec:
parentRefs:
- name: same-namespace
rules:
- matches:
- path:
type: PathPrefix
value: /redirect
backendRefs:
- name: infra-backend-v1
port: 8080
filters:
- type: FilterRequestRedirect
filterRequestRedirect:
scheme: https
hostname: www.redirect-example.com
port: 443
4 changes: 4 additions & 0 deletions pkg/features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ const (

// This option indicates support for HTTPRoute with a backendref with an appProtoocol 'kubernetes.io/ws' (extended conformance)
SupportHTTPRouteBackendProtocolWebSocket SupportedFeature = "HTTPRouteBackendProtocolWebSocket"

// This option indicates support for HTTPRoute filter request redirect (extended conformance)
SupportHTTPRouteFilterRequestRedirect SupportedFeature = "HTTPRouteFilterRequestRedirect"
)

// HTTPRouteExtendedFeatures includes all extended features for HTTPRoute
Expand All @@ -172,6 +175,7 @@ var HTTPRouteExtendedFeatures = sets.New(
SupportHTTPRouteBackendRequestHeaderModification,
SupportHTTPRouteBackendProtocolH2C,
SupportHTTPRouteBackendProtocolWebSocket,
SupportHTTPRouteFilterRequestRedirect,
)

// -----------------------------------------------------------------------------
Expand Down

0 comments on commit f6689f5

Please sign in to comment.