Skip to content

Commit f5b3ab9

Browse files
author
VikramBedi
committed
Allow cross-namespace routes in test Gateway to support webhook tests
1 parent eaffca9 commit f5b3ab9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/pkg/test/gateway.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,21 @@ func (env *Framework) NewGateway(name string, namespace string) *gwv1.Gateway {
2323
Name: "http",
2424
Protocol: gwv1.HTTPProtocolType,
2525
Port: 80,
26+
AllowedRoutes: &gwv1.AllowedRoutes{
27+
Namespaces: &gwv1.RouteNamespaces{
28+
From: lo.ToPtr(gwv1.NamespacesFromAll),
29+
},
30+
},
2631
},
2732
{
2833
Name: "https",
2934
Protocol: gwv1.HTTPSProtocolType,
3035
Port: 443,
36+
AllowedRoutes: &gwv1.AllowedRoutes{
37+
Namespaces: &gwv1.RouteNamespaces{
38+
From: lo.ToPtr(gwv1.NamespacesFromAll),
39+
},
40+
},
3141
TLS: &gwv1.GatewayTLSConfig{
3242
Mode: lo.ToPtr(gwv1.TLSModeTerminate),
3343
CertificateRefs: []gwv1.SecretObjectReference{
@@ -41,6 +51,11 @@ func (env *Framework) NewGateway(name string, namespace string) *gwv1.Gateway {
4151
Name: "tls",
4252
Protocol: gwv1.TLSProtocolType,
4353
Port: 444,
54+
AllowedRoutes: &gwv1.AllowedRoutes{
55+
Namespaces: &gwv1.RouteNamespaces{
56+
From: lo.ToPtr(gwv1.NamespacesFromAll),
57+
},
58+
},
4459
TLS: &gwv1.GatewayTLSConfig{
4560
Mode: lo.ToPtr(gwv1.TLSModePassthrough),
4661
},

0 commit comments

Comments
 (0)