From e136c6be6c8f77573c09d9558378a10d1bb1a81b Mon Sep 17 00:00:00 2001 From: DinethH Date: Fri, 1 Mar 2024 17:59:30 +0530 Subject: [PATCH] enabled http2 backend and unset transport socket matching --- adapter/internal/oasparser/envoyconf/routes_with_clusters.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adapter/internal/oasparser/envoyconf/routes_with_clusters.go b/adapter/internal/oasparser/envoyconf/routes_with_clusters.go index db78396cc..bb87f89bd 100644 --- a/adapter/internal/oasparser/envoyconf/routes_with_clusters.go +++ b/adapter/internal/oasparser/envoyconf/routes_with_clusters.go @@ -195,7 +195,6 @@ func CreateRoutesWithClusters(adapterInternalAPI *model.AdapterInternalAPI, inte adapterInternalAPI.GetTitle(), apiVersion, "") adapterInternalAPI.Endpoints.HTTP2BackendEnabled = true cluster, address, err := processEndpoints(clusterName, adapterInternalAPI.Endpoints, timeout, basePath) - if err != nil { logger.LoggerOasparser.ErrorC(logging.PrintError(logging.Error2239, logging.MAJOR, "Error while adding grpc endpoints for %s:%v. %v", apiTitle, apiVersion, err.Error())) @@ -209,12 +208,16 @@ func CreateRoutesWithClusters(adapterInternalAPI *model.AdapterInternalAPI, inte var clusterName string resourcePath := resource.GetPath() endpoint := resource.GetEndpoints() + //TODO see if I can configure this elsewhere + endpoint.HTTP2BackendEnabled = true basePath := strings.TrimSuffix(endpoint.Endpoints[0].Basepath, "/") existingClusterName := getExistingClusterName(*endpoint, processedEndpoints) if existingClusterName == "" { clusterName = getClusterName(endpoint.EndpointPrefix, organizationID, vHost, adapterInternalAPI.GetTitle(), apiVersion, resource.GetID()) cluster, address, err := processEndpoints(clusterName, endpoint, timeout, basePath) + //TODO see if I can configure this elsewhere + cluster.TransportSocketMatches = nil if err != nil { logger.LoggerOasparser.ErrorC(logging.PrintError(logging.Error2239, logging.MAJOR, "Error while adding resource level endpoints for %s:%v-%v. %v", apiTitle, apiVersion, resourcePath, err.Error())) } else {