Skip to content

Commit

Permalink
enabled http2 backend and unset transport socket matching
Browse files Browse the repository at this point in the history
  • Loading branch information
DDH13 committed Mar 8, 2024
1 parent 6fd3c38 commit e136c6b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion adapter/internal/oasparser/envoyconf/routes_with_clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand All @@ -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 {
Expand Down

0 comments on commit e136c6b

Please sign in to comment.