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 7, 2023
1 parent eec43d2 commit e83cbfb
Show file tree
Hide file tree
Showing 107 changed files with 259 additions and 376 deletions.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module github.com/envoyproxy/gateway

replace sigs.k8s.io/gateway-api v0.6.0 => github.com/arkodg/gateway-api v0.0.0-20230207210545-077b9e4f69d8

go 1.19

require (
Expand Down Expand Up @@ -84,7 +86,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
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/arkodg/gateway-api v0.0.0-20230207210545-077b9e4f69d8 h1:GcszgxeThi1xay1RS5mSc/iNyItP/CxidUzopeXtfc8=
github.com/arkodg/gateway-api v0.0.0-20230207210545-077b9e4f69d8/go.mod h1:kAd7P9upPCHHmoK/TmockUD64HgF7oPi+7QthnJOyEc=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
Expand Down Expand Up @@ -710,8 +712,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 All @@ -721,8 +723,6 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M=
sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0=
sigs.k8s.io/gateway-api v0.6.0 h1:v2FqrN2ROWZLrSnI2o91taHR8Sj3s+Eh3QU7gLNWIqA=
sigs.k8s.io/gateway-api v0.6.0/go.mod h1:EYJT+jlPWTeNskjV0JTki/03WX1cyAnBhwBJfYHpV/0=
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k=
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=
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 e83cbfb

Please sign in to comment.