Skip to content

Commit

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

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
  • Loading branch information
arkodg committed Feb 8, 2023
1 parent d01daec commit c71ced8
Show file tree
Hide file tree
Showing 105 changed files with 247 additions and 366 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/apiextensions-apiserver v0.26.1 // indirect
k8s.io/component-base v0.26.1 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/klog/v2 v2.90.0 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,8 @@ k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU=
k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE=
k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4=
k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU=
k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/klog/v2 v2.90.0 h1:VkTxIV/FjRXn1fgNNcKGM8cfmL1Z33ZjXRTVxKCoF5M=
k8s.io/klog/v2 v2.90.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E=
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y=
Expand Down
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 c71ced8

Please sign in to comment.