Skip to content

Commit

Permalink
Add GRPCRoute to SupportedKinds (envoyproxy#990)
Browse files Browse the repository at this point in the history
Fixes: envoyproxy#950

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
  • Loading branch information
arkodg authored Feb 8, 2023
1 parent d01daec commit beb6eae
Show file tree
Hide file tree
Showing 103 changed files with 244 additions and 363 deletions.
3 changes: 1 addition & 2 deletions internal/gatewayapi/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap
case v1beta1.TLSProtocolType:
t.validateAllowedRoutes(listener, KindTLSRoute)
case v1beta1.HTTPProtocolType, v1beta1.HTTPSProtocolType:
// Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
t.validateAllowedRoutes(listener, KindHTTPRoute) // , KindGRPCRoute)
t.validateAllowedRoutes(listener, KindHTTPRoute, KindGRPCRoute)
case v1beta1.TCPProtocolType:
t.validateAllowedRoutes(listener, KindTCPRoute)
case v1beta1.UDPProtocolType:
Expand Down
5 changes: 2 additions & 3 deletions internal/gatewayapi/testdata/envoyproxy-valid.out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 0
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 0
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 0
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gateways:
- type: ResolvedRefs
status: "False"
reason: InvalidRouteKinds
message: "FooRoute is not supported, kind must be one of [HTTPRoute]"
message: "FooRoute is not supported, kind must be one of [HTTPRoute GRPCRoute]"
- type: Programmed
status: "False"
reason: Invalid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 0
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 0
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 0
conditions:
- type: ResolvedRefs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 0
conditions:
- type: ResolvedRefs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 0
conditions:
- type: ResolvedRefs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 0
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
conditions:
- type: Conflicted
status: "True"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
AttachedRoutes: 2
conditions:
- type: Programmed
Expand All @@ -40,9 +39,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
AttachedRoutes: 2
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
conditions:
- type: Conflicted
status: "True"
Expand All @@ -43,9 +42,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
conditions:
- type: Conflicted
status: "True"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
conditions:
- type: Conflicted
status: "True"
Expand All @@ -43,9 +42,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
conditions:
- type: Conflicted
status: "True"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
AttachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
AttachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ gateways:
supportedKinds:
- group: gateway.networking.k8s.io
kind: HTTPRoute
# Uncomment when https://github.com/envoyproxy/gateway/issues/950 is fixed
#- group: gateway.networking.k8s.io
#kind: GRPCRoute
- group: gateway.networking.k8s.io
kind: GRPCRoute
attachedRoutes: 1
conditions:
- type: Programmed
Expand Down
Loading

0 comments on commit beb6eae

Please sign in to comment.