|
|
@ -425,8 +425,18 @@ func (s *ResourceGenerator) makeGatewayServiceClusters(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
clusters = append(clusters, cluster)
|
|
|
|
clusters = append(clusters, cluster)
|
|
|
|
|
|
|
|
|
|
|
|
gatewaySvc, ok := cfgSnap.TerminatingGateway.GatewayServices[svc]
|
|
|
|
svcConfig, ok := cfgSnap.TerminatingGateway.ServiceConfigs[svc]
|
|
|
|
isHTTP2 := ok && (gatewaySvc.Protocol == "http2" || gatewaySvc.Protocol == "grpc")
|
|
|
|
isHTTP2 := false
|
|
|
|
|
|
|
|
if ok {
|
|
|
|
|
|
|
|
upstreamCfg, err := structs.ParseUpstreamConfig(svcConfig.ProxyConfig)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
// Don't hard fail on a config typo, just warn. The parse func returns
|
|
|
|
|
|
|
|
// default config if there is an error so it's safe to continue.
|
|
|
|
|
|
|
|
s.Logger.Warn("failed to parse", "upstream", svc, "error", err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
isHTTP2 = upstreamCfg.Protocol == "http2" || upstreamCfg.Protocol == "grpc"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if isHTTP2 {
|
|
|
|
if isHTTP2 {
|
|
|
|
if err := s.setHttp2ProtocolOptions(cluster); err != nil {
|
|
|
|
if err := s.setHttp2ProtocolOptions(cluster); err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|