From 18a975a5a8c250b72aaebbfebb605ac8e6ddf48f Mon Sep 17 00:00:00 2001 From: Kieron Browne Date: Tue, 26 Jul 2022 14:37:08 +0000 Subject: [PATCH] Allow korifi apps to use websockets It turns out that Contour is disallowing websockets by default. This breaks apps like postfacto. This commit allows all apps to use websockets. Co-authored-by: Georgi Sabev --- controllers/controllers/networking/cfroute_controller.go | 3 ++- .../integration/cfroute_controller_integration_test.go | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/controllers/networking/cfroute_controller.go b/controllers/controllers/networking/cfroute_controller.go index 7cdcacfe4..9423f5d98 100644 --- a/controllers/controllers/networking/cfroute_controller.go +++ b/controllers/controllers/networking/cfroute_controller.go @@ -298,7 +298,8 @@ func (r *CFRouteReconciler) createOrPatchRouteProxy(ctx context.Context, cfRoute Conditions: []contourv1.MatchCondition{ {Prefix: cfRoute.Spec.Path}, }, - Services: services, + Services: services, + EnableWebsockets: true, }, } } diff --git a/controllers/controllers/networking/integration/cfroute_controller_integration_test.go b/controllers/controllers/networking/integration/cfroute_controller_integration_test.go index c454b46e1..e83de5f3a 100644 --- a/controllers/controllers/networking/integration/cfroute_controller_integration_test.go +++ b/controllers/controllers/networking/integration/cfroute_controller_integration_test.go @@ -278,6 +278,7 @@ var _ = Describe("CFRouteReconciler Integration Tests", func() { Port: cfRoute.Spec.Destinations[0].Port, }, }, + EnableWebsockets: true, }), "HTTPProxy route does not match destination") }) @@ -473,6 +474,7 @@ var _ = Describe("CFRouteReconciler Integration Tests", func() { Port: duplicateRoute.Spec.Destinations[0].Port, }, }, + EnableWebsockets: true, }), "HTTPProxy route does not match destination") }) }) @@ -561,6 +563,7 @@ var _ = Describe("CFRouteReconciler Integration Tests", func() { Port: cfRoute.Spec.Destinations[1].Port, }, }, + EnableWebsockets: true, }, }), "HTTPProxy routes mismatch") })