diff --git a/internal/gatewayapi/route.go b/internal/gatewayapi/route.go index 4edc6cce86c..c4feee9f3ed 100644 --- a/internal/gatewayapi/route.go +++ b/internal/gatewayapi/route.go @@ -11,7 +11,7 @@ import ( "time" corev1 "k8s.io/api/core/v1" - v1 "k8s.io/api/discovery/v1" + discoveryv1 "k8s.io/api/discovery/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a1 "sigs.k8s.io/gateway-api/apis/v1alpha2" @@ -1005,6 +1005,7 @@ func (t *Translator) processDestination(backendRef gwapiv1.BackendRef, } var endpoints []*ir.DestinationEndpoint + protocol := inspectAppProtocolByRouteKind(routeType) switch KindDerefOr(backendRef.Kind, KindService) { case KindServiceImport: serviceImport := resources.GetServiceImport(backendNamespace, string(backendRef.Name)) @@ -1037,12 +1038,18 @@ func (t *Translator) processDestination(backendRef gwapiv1.BackendRef, } } + // support HTTPRouteBackendProtocolH2C + if servicePort.AppProtocol != nil && + *servicePort.AppProtocol == "kubernetes.io/h2c" { + protocol = ir.HTTP2 + } + // Route to endpoints by default if !t.EndpointRoutingDisabled { endpointSlices := resources.GetEndpointSlicesForBackend(backendNamespace, string(backendRef.Name), KindDerefOr(backendRef.Kind, KindService)) endpoints = getIREndpointsFromEndpointSlice(endpointSlices, servicePort.Name, servicePort.Protocol) } else { - // Fall back to Service CluserIP routing + // Fall back to Service ClusterIP routing ep := ir.NewDestEndpoint( service.Spec.ClusterIP, uint32(*backendRef.Port)) @@ -1052,11 +1059,28 @@ func (t *Translator) processDestination(backendRef gwapiv1.BackendRef, ds = &ir.DestinationSetting{ Weight: &weight, + Protocol: protocol, Endpoints: endpoints, } return ds, weight } +func inspectAppProtocolByRouteKind(kind gwapiv1.Kind) ir.AppProtocol { + switch kind { + case KindUDPRoute: + return ir.UDP + case KindHTTPRoute: + return ir.HTTP + case KindTCPRoute: + return ir.TCP + case KindGRPCRoute: + return ir.GRPC + case KindTLSRoute: + return ir.HTTPS + } + return ir.TCP +} + // processAllowedListenersForParentRefs finds out if the route attaches to one of our // Gateways' listeners, and if so, gets the list of listeners that allow it to // attach for each parentRef. @@ -1127,7 +1151,7 @@ func (t *Translator) processAllowedListenersForParentRefs(routeContext RouteCont return relevantRoute } -func getIREndpointsFromEndpointSlice(endpointSlices []*v1.EndpointSlice, portName string, portProtocol corev1.Protocol) []*ir.DestinationEndpoint { +func getIREndpointsFromEndpointSlice(endpointSlices []*discoveryv1.EndpointSlice, portName string, portProtocol corev1.Protocol) []*ir.DestinationEndpoint { endpoints := []*ir.DestinationEndpoint{} for _, endpointSlice := range endpointSlices { for _, endpoint := range endpointSlice.Endpoints { diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml index a8c1817427c..b6be965c840 100755 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml @@ -248,6 +248,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' loadBalancer: @@ -274,6 +275,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io loadBalancer: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml index 1903b43a593..0e4723e95a9 100755 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml @@ -266,6 +266,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' name: grpcroute/default/grpcroute-1/rule/0/match/-1/* @@ -302,6 +303,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml b/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml index d01e792dd71..e8dac2910d8 100644 --- a/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml +++ b/internal/gatewayapi/testdata/extensions/httproute-with-valid-extension-filter.out.yaml @@ -122,6 +122,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 extensionRefs: - object: diff --git a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml index 25c3cce6796..c039814f78a 100644 --- a/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml +++ b/internal/gatewayapi/testdata/gateway-allows-same-namespace-with-allowed-httproute.out.yaml @@ -111,6 +111,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/envoy-gateway/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml index 851bdc81538..8af7e3a482e 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-secret-in-other-namespace-allowed-by-refgrant.out.yaml @@ -118,6 +118,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml index 125a1519bac..3c16278e7d3 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tls-terminate-and-passthrough.out.yaml @@ -184,6 +184,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo.bar.com name: httproute/default/httproute-1/rule/0/match/0/foo_bar_com @@ -203,6 +204,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTPS weight: 1 name: envoy-gateway/gateway-1/tls-passthrough/tlsroute-1 port: 10090 diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml index 806ed34a6b6..d4a11d1f117 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration-with-same-algorithm-different-fqdn.out.yaml @@ -120,6 +120,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml index 07a1de64cb4..7fd1fa8d757 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-multiple-tls-configuration.out.yaml @@ -120,6 +120,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml index 337937ea290..256f5fa5750 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-valid-tls-configuration.out.yaml @@ -117,6 +117,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml index 7f3e382bf42..d5a4ceb4895 100644 --- a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml @@ -111,6 +111,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.out.yaml b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.out.yaml index a88038eae96..74ac5e6d3ca 100644 --- a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-tcproutes.out.yaml @@ -128,6 +128,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8163 + protocol: TCP weight: 1 name: envoy-gateway/gateway-1/tcp/tcproute-1 port: 10162 diff --git a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.out.yaml b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.out.yaml index 754dae0c4dc..b0410c25dce 100644 --- a/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-single-listener-with-multiple-udproutes.out.yaml @@ -128,6 +128,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8162 + protocol: UDP weight: 1 name: envoy-gateway/gateway-1/udp/udproute-1 port: 10162 diff --git a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml index cc331a9ec1d..7d8d30b12c1 100644 --- a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml @@ -117,6 +117,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.out.yaml index 9f6f8957295..298f66ec3c3 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-tcp-or-tls-port.out.yaml @@ -126,6 +126,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8163 + protocol: TCP weight: 1 name: envoy-gateway/gateway-1/tcp1/tcproute-1 port: 10162 diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.out.yaml index 4b312da21d8..7a24c09c837 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-on-same-udp-port.out.yaml @@ -124,6 +124,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8162 + protocol: UDP weight: 1 name: envoy-gateway/gateway-1/udp1/udproute-1 port: 10162 diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml index d7f5bbc33e2..5da2538be94 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-multiple-httproutes.out.yaml @@ -180,6 +180,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo.com name: httproute/default/httproute-2/rule/0/match/0/foo_com @@ -196,6 +197,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo.com name: httproute/default/httproute-1/rule/0/match/0/foo_com @@ -219,6 +221,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar.com name: httproute/default/httproute-2/rule/0/match/0/bar_com @@ -235,6 +238,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar.com name: httproute/default/httproute-1/rule/0/match/0/bar_com diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml index da39c8b00ef..79634a36482 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-tcp-protocol.out.yaml @@ -175,6 +175,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* @@ -190,6 +191,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8163 + protocol: TCP weight: 1 name: envoy-gateway/gateway-1/tcp/tcproute-1 port: 10080 diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml index d59e161199d..7805c70ac38 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-same-port-http-udp-protocol.out.yaml @@ -175,6 +175,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* @@ -190,6 +191,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8162 + protocol: UDP weight: 1 name: envoy-gateway/gateway-1/udp/udproute-1 port: 10080 diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.out.yaml index 49acc6c8452..df1b7a0ae3d 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-with-sectionname.out.yaml @@ -163,6 +163,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8163 + protocol: TCP weight: 1 name: envoy-gateway/gateway-1/tcp1/tcproute-1 port: 10162 @@ -174,6 +175,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8163 + protocol: TCP weight: 1 name: envoy-gateway/gateway-1/tcp2/tcproute-2 port: 10163 diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.out.yaml index 759e45901db..0168d322afa 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-tcproutes-without-sectionname.out.yaml @@ -159,6 +159,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8163 + protocol: TCP weight: 1 name: envoy-gateway/gateway-1/tcp1/tcproute-1 port: 10161 @@ -170,6 +171,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8163 + protocol: TCP weight: 1 name: envoy-gateway/gateway-1/tcp2/tcproute-1 port: 10162 diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.out.yaml index a5a304ba208..a0cdded06ba 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-with-sectionname.out.yaml @@ -163,6 +163,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8162 + protocol: UDP weight: 1 name: envoy-gateway/gateway-1/udp1/udproute-1 port: 10162 @@ -173,6 +174,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8162 + protocol: UDP weight: 1 name: envoy-gateway/gateway-1/udp2/udproute-2 port: 10163 diff --git a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.out.yaml b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.out.yaml index 692388c6498..30aa11dd95d 100644 --- a/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-two-listeners-with-udproutes-without-sectionname.out.yaml @@ -159,6 +159,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8162 + protocol: UDP weight: 1 name: envoy-gateway/gateway-1/udp1/udproute-1 port: 10161 @@ -169,6 +170,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8162 + protocol: UDP weight: 1 name: envoy-gateway/gateway-1/udp2/udproute-1 port: 10162 diff --git a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml index 59d139d01c1..f0068b645d8 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml @@ -115,6 +115,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 headerMatches: - distinct: false diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml index ee66e91bc17..1da89fcadb9 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-and-service-match.out.yaml @@ -119,6 +119,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' name: grpcroute/default/grpcroute-1/rule/0/match/0/* @@ -135,6 +136,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' name: grpcroute/default/grpcroute-1/rule/0/match/1/* diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml index b7fc079c14f..5177fb3c8fc 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml @@ -117,6 +117,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' name: grpcroute/default/grpcroute-1/rule/0/match/1/* @@ -133,6 +134,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 headerMatches: - distinct: false diff --git a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml index 1891581612e..e11ecaa5f72 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml @@ -120,6 +120,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' name: grpcroute/default/grpcroute-1/rule/0/match/-1/* diff --git a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml index 55e3230098b..3cdb86680df 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml @@ -117,6 +117,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' name: grpcroute/default/grpcroute-1/rule/0/match/0/* @@ -133,6 +134,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' name: grpcroute/default/grpcroute-1/rule/0/match/1/* diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml index d30026097ab..d355e36099d 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-different-listeners.out.yaml @@ -350,6 +350,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo.com name: httproute/default/httproute-1/rule/0/match/0/foo_com @@ -373,6 +374,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar.com name: httproute/default/httproute-1/rule/0/match/0/bar_com @@ -396,6 +398,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo1.com name: httproute/default/httproute-1/rule/0/match/0/foo1_com @@ -419,6 +422,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar1.com name: httproute/default/httproute-1/rule/0/match/0/bar1_com @@ -442,6 +446,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo2.com name: httproute/default/httproute-1/rule/0/match/0/foo2_com @@ -465,6 +470,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar2.com name: httproute/default/httproute-1/rule/0/match/0/bar2_com @@ -488,6 +494,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo3.com name: httproute/default/httproute-1/rule/0/match/0/foo3_com @@ -511,6 +518,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar3.com name: httproute/default/httproute-1/rule/0/match/0/bar3_com diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml index de694b38c8c..6022df48ce9 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-more-listeners.out.yaml @@ -322,6 +322,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo.com name: httproute/default/httproute-1/rule/0/match/0/foo_com @@ -345,6 +346,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar.com name: httproute/default/httproute-1/rule/0/match/0/bar_com @@ -368,6 +370,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo1.com name: httproute/default/httproute-1/rule/0/match/0/foo1_com @@ -391,6 +394,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar1.com name: httproute/default/httproute-1/rule/0/match/0/bar1_com @@ -414,6 +418,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo2.com name: httproute/default/httproute-1/rule/0/match/0/foo2_com @@ -437,6 +442,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar2.com name: httproute/default/httproute-1/rule/0/match/0/bar2_com @@ -460,6 +466,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo3.com name: httproute/default/httproute-1/rule/0/match/0/foo3_com @@ -483,6 +490,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar3.com name: httproute/default/httproute-1/rule/0/match/0/bar3_com diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml index 737d43da668..bf3911172f2 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners-with-different-ports.out.yaml @@ -150,6 +150,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* @@ -173,6 +174,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml index e88edaa93ac..bb65228cd75 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway-with-two-listeners.out.yaml @@ -142,6 +142,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: foo.com name: httproute/default/httproute-1/rule/0/match/0/foo_com @@ -165,6 +166,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar.com name: httproute/default/httproute-1/rule/0/match/0/bar_com diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml index ae14d6cbe63..7f7a8f3e1d2 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml @@ -111,6 +111,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml index a8d9a02048b..6b4b54e6652 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-matching-port.out.yaml @@ -115,6 +115,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml index dddac198b29..c80b1d0fc47 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-on-gateway-with-two-listeners.out.yaml @@ -150,6 +150,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: bar.com name: httproute/default/httproute-1/rule/0/match/0/bar_com diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml index f5334296b70..8dd36eaab4a 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref.out.yaml @@ -115,6 +115,7 @@ xdsIR: - endpoints: - host: 8.8.8.8 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml index aae08dee870..292fa7c579e 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml @@ -113,6 +113,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml index d910e6e5442..e8a69536bcd 100755 --- a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml @@ -115,6 +115,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml index 8e55e85f2be..784af59968c 100644 --- a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml @@ -115,6 +115,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml index d7fc6c8c81c..0a5d688c520 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-no-weights.out.yaml @@ -115,14 +115,17 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml index 06e52bfe474..b9914097e1c 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-multiple-backends-and-weights.out.yaml @@ -118,14 +118,17 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 2 - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 3 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml index c9c5a58e59d..feb27921697 100644 --- a/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml @@ -113,6 +113,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml index 20ed4f04dbb..ce891f3e31a 100644 --- a/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-backendref-serviceimport-in-other-namespace-allowed-by-refgrant.out.yaml @@ -115,6 +115,7 @@ xdsIR: - endpoints: - host: 8.8.8.8 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml index 14f190acbc5..77b8f9ed8d0 100644 --- a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml @@ -110,6 +110,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/-1/* diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml index b186106f0ce..eaf4f97f422 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-add-multiple-filters.out.yaml @@ -141,6 +141,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml index 55a7d36259c..d95b214ddbf 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-adds.out.yaml @@ -157,6 +157,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml index 7f12824c553..18f1c0832a5 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-remove-multiple-filters.out.yaml @@ -127,6 +127,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml index a466c593e7a..d8f6fb86074 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-duplicate-removes.out.yaml @@ -122,6 +122,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml index 2e4b11c24cb..3d7bcf38534 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-empty-header-values.out.yaml @@ -132,6 +132,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml index d2d65c9dd62..e8ded08b7a7 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-no-headers.out.yaml @@ -119,6 +119,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml index 2ae92bdd504..f8f8387c8b0 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml @@ -123,6 +123,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml index afa9f1c4524..ebd06bcda6b 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml @@ -129,6 +129,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io mirrors: @@ -137,12 +138,14 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 - name: httproute/default/httproute-1/rule/0-mirror-1 settings: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io pathMatch: diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml index d5aa80f0bd1..70b570f89f7 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml @@ -151,6 +151,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io mirrors: @@ -159,12 +160,14 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 - name: httproute/default/httproute-1/rule/0-mirror-2 settings: - endpoints: - host: 7.6.5.4 port: 8080 + protocol: HTTP weight: 1 name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io pathMatch: diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml index 85b30ec48e6..5c4d788a2e6 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-no-port.out.yaml @@ -123,6 +123,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml index 2858e31d5aa..1dd25e0427f 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-service-not-found.out.yaml @@ -123,6 +123,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml index 6d64d583a12..e3355ceb10c 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml @@ -123,6 +123,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io mirrors: @@ -131,6 +132,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io pathMatch: diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml index d376bb2bd31..fa69c95125d 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-adds.out.yaml @@ -153,6 +153,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml index 082da467faa..c6cd70c426e 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-add-multiple-filters.out.yaml @@ -141,6 +141,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml index 7387da265c8..7c8fdc5b531 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-adds.out.yaml @@ -157,6 +157,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml index 5050624b40e..447fac2d3be 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-remove-multiple-filters.out.yaml @@ -127,6 +127,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml index a6d34ce0944..5b623cd6ba8 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-duplicate-removes.out.yaml @@ -122,6 +122,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml index dce73fb7d96..328798f4ac2 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-empty-header-values.out.yaml @@ -132,6 +132,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml index 80d939f8009..f0b1cd0d639 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-no-headers.out.yaml @@ -119,6 +119,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml b/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml index e1d73c90422..6d52a258a0e 100644 --- a/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-response-header-filter-remove.out.yaml @@ -123,6 +123,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml index 3de870613b9..5c98a914fd0 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-exact-path-match.out.yaml @@ -112,6 +112,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml index fdb845ae1d0..1e2121fd72d 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-http-method-match.out.yaml @@ -110,6 +110,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 headerMatches: - distinct: false diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml index c5e10904d8e..b7fb0e5c1bb 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-multiple-rules.out.yaml @@ -142,6 +142,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 headerMatches: - distinct: false @@ -166,6 +167,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/1/match/0/* @@ -182,6 +184,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 headerMatches: - distinct: false diff --git a/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml b/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml index 4bb51c36abf..b82e6dca274 100644 --- a/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-single-rule-with-path-prefix-and-exact-header-matches.out.yaml @@ -116,6 +116,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 headerMatches: - distinct: false diff --git a/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml b/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml index cd095768ea3..c2f5181aff0 100644 --- a/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-some-invalid-backend-refs-no-service.out.yaml @@ -116,6 +116,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/default/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml index 8654dbf94b4..16f154f19c6 100644 --- a/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-specific-hostname-attaching-to-gateway-with-wildcard-hostname.out.yaml @@ -114,6 +114,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml index f89e3718881..17b2fc20b95 100644 --- a/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-two-specific-hostnames-attaching-to-gateway-with-wildcard-hostname.out.yaml @@ -115,6 +115,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io @@ -131,6 +132,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: whales.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/whales_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml index a216ec0d08e..b1cefeec922 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-full-path-replace-http.out.yaml @@ -122,6 +122,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml index 1758895c365..0cdf34621e4 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname-prefix-replace.out.yaml @@ -123,6 +123,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml index c89bf6ad9e6..84e6ef65a36 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml @@ -120,6 +120,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml index 8b3354f1a3b..129286419c3 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-invalid-filter-type.out.yaml @@ -120,6 +120,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml index a77717cbd76..c0a7f60f73a 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-prefix-replace-http.out.yaml @@ -122,6 +122,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml b/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml index 6f9a6e0f893..35c8b7ae01c 100644 --- a/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-wildcard-hostname-attaching-to-gateway-with-unset-hostname.out.yaml @@ -113,6 +113,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*.envoyproxy.io' name: httproute/default/httproute-1/rule/0/match/0/*_envoyproxy_io diff --git a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml index 83b255739cf..5b495b41e03 100644 --- a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml @@ -298,6 +298,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: example.com name: httproute/envoy-gateway/httproute-2/rule/0/match/0/example_com @@ -318,6 +319,7 @@ xdsIR: - endpoints: - host: 8.8.8.8 port: 8080 + protocol: HTTP weight: 1 hostname: example.com name: httproute/envoy-gateway/httproute-3/rule/0/match/0/example_com @@ -334,6 +336,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 headerMatches: - distinct: false @@ -354,6 +357,7 @@ xdsIR: - endpoints: - host: 8.8.8.8 port: 8080 + protocol: HTTP weight: 1 hostname: example.net name: httproute/envoy-gateway/httproute-5/rule/0/match/0/example_net @@ -370,6 +374,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*.com' name: httproute/envoy-gateway/httproute-1/rule/0/match/0/*_com @@ -386,6 +391,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*.net' name: httproute/envoy-gateway/httproute-1/rule/0/match/0/*_net @@ -402,6 +408,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: '*' name: httproute/envoy-gateway/httproute-1/rule/0/match/0/* diff --git a/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml b/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml index b7a57690426..3074568ba9e 100755 --- a/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml +++ b/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml @@ -235,6 +235,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io @@ -264,6 +265,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: example.com name: httproute/default/httproute-2/rule/0/match/0/example_com diff --git a/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml index 0a2b0cbb239..9e2fc0e1fb6 100755 --- a/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml @@ -292,6 +292,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' name: grpcroute/default/grpcroute-1/rule/0/match/-1/* @@ -334,6 +335,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io name: httproute/default/httproute-1/rule/0/match/0/gateway_envoyproxy_io diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml index 8acf1b66a51..c14252d3ef1 100755 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml @@ -273,6 +273,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: GRPC weight: 1 hostname: '*' jwt: @@ -317,6 +318,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTP weight: 1 hostname: gateway.envoyproxy.io jwt: diff --git a/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.out.yaml b/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.out.yaml index 20df52b004f..aea8b733cab 100644 --- a/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.out.yaml +++ b/internal/gatewayapi/testdata/tcproute-attaching-to-gateway-with-listener-tls-terminate.out.yaml @@ -103,6 +103,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: TCP weight: 1 name: envoy-gateway/gateway-1/tls/tcproute-1 port: 10090 diff --git a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml index 8e45df442d5..af83c0f97df 100644 --- a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml @@ -100,6 +100,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTPS weight: 1 name: envoy-gateway/gateway-1/tls/tlsroute-1 port: 10090 diff --git a/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml b/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml index 77b25d4495f..bf5d7a8b744 100644 --- a/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml @@ -134,6 +134,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTPS weight: 1 name: envoy-gateway/gateway-1/tls/tlsroute-1 port: 10091 @@ -148,6 +149,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTPS weight: 1 name: envoy-gateway/gateway-1/tls/tlsroute-2 port: 10091 diff --git a/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml index 4264efe0bef..014d9dff690 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-backendref-in-other-namespace-allowed-by-refgrant.out.yaml @@ -101,6 +101,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTPS weight: 1 name: envoy-gateway/gateway-1/tls/tlsroute-1 port: 10090 diff --git a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml index cb9f727850e..19779d07c21 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml @@ -99,6 +99,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTPS weight: 1 name: envoy-gateway/gateway-1/tls/tlsroute-1 port: 10091 diff --git a/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml index 414c6b8e574..bd87196bc86 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml @@ -101,6 +101,7 @@ xdsIR: - endpoints: - host: 7.7.7.7 port: 8080 + protocol: HTTPS weight: 1 name: envoy-gateway/gateway-1/tls/tlsroute-1 port: 10091 diff --git a/internal/ir/protocol.go b/internal/ir/protocol.go new file mode 100644 index 00000000000..805443921b2 --- /dev/null +++ b/internal/ir/protocol.go @@ -0,0 +1,27 @@ +// Copyright Envoy Gateway Authors +// SPDX-License-Identifier: Apache-2.0 +// The full text of the Apache license is available in the LICENSE file at +// the root of the repo. + +package ir + +type AppProtocol string + +const ( + // GRPC declares that the port carries gRPC traffic. + GRPC AppProtocol = "GRPC" + // GRPCWeb declares that the port carries gRPC traffic. + GRPCWeb AppProtocol = "GRPC-Web" + // HTTP declares that the port carries HTTP/1.1 traffic. + // Note that HTTP/1.0 or earlier may not be supported by the proxy. + HTTP AppProtocol = "HTTP" + // HTTP2 declares that the port carries HTTP/2 traffic. + HTTP2 AppProtocol = "HTTP2" + // HTTPS declares that the port carries HTTPS traffic. + HTTPS AppProtocol = "HTTPS" + // TCP declares the port uses TCP. + // This is the default protocol for a service port. + TCP AppProtocol = "TCP" + // UDP declares that the port uses UDP. + UDP AppProtocol = "UDP" +) diff --git a/internal/ir/xds.go b/internal/ir/xds.go index 262a3891ff5..9411edba70d 100644 --- a/internal/ir/xds.go +++ b/internal/ir/xds.go @@ -13,7 +13,6 @@ import ( "github.com/tetratelabs/multierror" "golang.org/x/exp/slices" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -172,7 +171,8 @@ type HTTPListener struct { TLS []*TLSListenerConfig `json:"tls,omitempty" yaml:"tls,omitempty"` // Routes associated with HTTP traffic to the service. Routes []*HTTPRoute `json:"routes,omitempty" yaml:"routes,omitempty"` - // IsHTTP2 is set if the upstream client as well as the downstream server are configured to serve HTTP2 traffic. + // IsHTTP2 is set if the listener is configured to serve HTTP2 traffic, + // grpc-web and grpc-stats are also enabled if this is set. IsHTTP2 bool `json:"isHTTP2" yaml:"isHTTP2"` // TCPKeepalive configuration for the listener TCPKeepalive *TCPKeepalive `json:"tcpKeepalive,omitempty" yaml:"tcpKeepalive,omitempty"` @@ -467,7 +467,6 @@ func (r RouteDestination) Validate() error { } return errs - } // DestinationSetting holds the settings associated with the destination @@ -475,7 +474,9 @@ func (r RouteDestination) Validate() error { type DestinationSetting struct { // Weight associated with this destination. // Note: Weight is not used in TCP/UDP route. - Weight *uint32 `json:"weight,omitempty" yaml:"weight,omitempty"` + Weight *uint32 `json:"weight,omitempty" yaml:"weight,omitempty"` + // Protocol associated with this destination/port. + Protocol AppProtocol `json:"protocol" yaml:"protocol"` Endpoints []*DestinationEndpoint `json:"endpoints,omitempty" yaml:"endpoints,omitempty"` } @@ -489,7 +490,6 @@ func (d DestinationSetting) Validate() error { } return errs - } // DestinationEndpoint holds the endpoint details associated with the destination diff --git a/internal/xds/translator/accesslog.go b/internal/xds/translator/accesslog.go index 25b627e4b81..0fa06c9a211 100644 --- a/internal/xds/translator/accesslog.go +++ b/internal/xds/translator/accesslog.go @@ -243,13 +243,13 @@ func processClusterForAccessLog(tCtx *types.ResourceVersionTable, al *ir.AccessL ds := &ir.DestinationSetting{ Weight: ptr.To(uint32(1)), + Protocol: ir.GRPC, Endpoints: []*ir.DestinationEndpoint{ir.NewDestEndpoint(otel.Host, otel.Port)}, } if err := addXdsCluster(tCtx, &xdsClusterArgs{ name: clusterName, settings: []*ir.DestinationSetting{ds}, tSocket: nil, - protocol: HTTP2, endpointType: DefaultEndpointType, }); err != nil && !errors.Is(err, ErrXdsClusterExists) { return err diff --git a/internal/xds/translator/cluster.go b/internal/xds/translator/cluster.go index 0b30c07176c..a5be54e6d70 100644 --- a/internal/xds/translator/cluster.go +++ b/internal/xds/translator/cluster.go @@ -60,7 +60,15 @@ func buildXdsCluster(args *xdsClusterArgs) *clusterv3.Cluster { cluster.RespectDnsTtl = true } - if args.protocol == HTTP2 { + isHTTP2 := false + for _, ds := range args.settings { + if ds.Protocol == ir.GRPC || + ds.Protocol == ir.HTTP2 { + isHTTP2 = true + break + } + } + if isHTTP2 { cluster.TypedExtensionProtocolOptions = buildTypedExtensionProtocolOptions() } diff --git a/internal/xds/translator/cluster_test.go b/internal/xds/translator/cluster_test.go index 30235b6d4d6..b7a024e6cf5 100644 --- a/internal/xds/translator/cluster_test.go +++ b/internal/xds/translator/cluster_test.go @@ -31,7 +31,6 @@ func TestBuildXdsCluster(t *testing.T) { args := &xdsClusterArgs{ name: bootstrapXdsCluster.Name, tSocket: bootstrapXdsCluster.TransportSocket, - protocol: HTTP2, endpointType: DefaultEndpointType, } dynamicXdsCluster := buildXdsCluster(args) diff --git a/internal/xds/translator/jwt_authn.go b/internal/xds/translator/jwt_authn.go index 7003bcac3fb..34bf2841e48 100644 --- a/internal/xds/translator/jwt_authn.go +++ b/internal/xds/translator/jwt_authn.go @@ -268,7 +268,6 @@ func createJWKSClusters(tCtx *types.ResourceVersionTable, routes []*ir.HTTPRoute name: jwks.name, settings: []*ir.DestinationSetting{ds}, tSocket: tSocket, - protocol: DefaultProtocol, endpointType: epType, }); err != nil && !errors.Is(err, ErrXdsClusterExists) { return err diff --git a/internal/xds/translator/ratelimit.go b/internal/xds/translator/ratelimit.go index 6a347904079..427c6bf7ec5 100644 --- a/internal/xds/translator/ratelimit.go +++ b/internal/xds/translator/ratelimit.go @@ -8,6 +8,7 @@ package translator import ( "bytes" "errors" + "net/url" "strconv" "strings" @@ -432,6 +433,7 @@ func (t *Translator) createRateLimitServiceCluster(tCtx *types.ResourceVersionTa host, port := t.getRateLimitServiceGrpcHostPort() ds := &ir.DestinationSetting{ Weight: ptr.To(uint32(1)), + Protocol: ir.GRPC, Endpoints: []*ir.DestinationEndpoint{ir.NewDestEndpoint(host, uint32(port))}, } @@ -444,7 +446,6 @@ func (t *Translator) createRateLimitServiceCluster(tCtx *types.ResourceVersionTa name: clusterName, settings: []*ir.DestinationSetting{ds}, tSocket: tSocket, - protocol: HTTP2, endpointType: DefaultEndpointType, }); err != nil && !errors.Is(err, ErrXdsClusterExists) { return err diff --git a/internal/xds/translator/testdata/in/xds-ir/http2-route.yaml b/internal/xds/translator/testdata/in/xds-ir/http2-route.yaml index ea4db20ccc9..2a61570f0ec 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http2-route.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http2-route.yaml @@ -24,3 +24,4 @@ http: - endpoints: - host: "1.2.3.4" port: 50000 + protocol: GRPC diff --git a/internal/xds/translator/tracing.go b/internal/xds/translator/tracing.go index 53a7c46a885..78127f283b3 100644 --- a/internal/xds/translator/tracing.go +++ b/internal/xds/translator/tracing.go @@ -125,13 +125,13 @@ func processClusterForTracing(tCtx *types.ResourceVersionTable, tracing *ir.Trac ds := &ir.DestinationSetting{ Weight: ptr.To(uint32(1)), + Protocol: ir.GRPC, Endpoints: []*ir.DestinationEndpoint{ir.NewDestEndpoint(tracing.Provider.Host, uint32(tracing.Provider.Port))}, } if err := addXdsCluster(tCtx, &xdsClusterArgs{ name: clusterName, settings: []*ir.DestinationSetting{ds}, tSocket: nil, - protocol: HTTP2, endpointType: DefaultEndpointType, }); err != nil && !errors.Is(err, ErrXdsClusterExists) { return err diff --git a/internal/xds/translator/translator.go b/internal/xds/translator/translator.go index 82fd0937aef..e65e8cac08a 100644 --- a/internal/xds/translator/translator.go +++ b/internal/xds/translator/translator.go @@ -153,11 +153,6 @@ func (t *Translator) processHTTPListenerXdsTranslation(tCtx *types.ResourceVersi } } - protocol := DefaultProtocol - if httpListener.IsHTTP2 { - protocol = HTTP2 - } - // store virtual hosts by domain vHosts := map[string]*routev3.VirtualHost{} // keep track of order by using a list as well as the map @@ -215,7 +210,6 @@ func (t *Translator) processHTTPListenerXdsTranslation(tCtx *types.ResourceVersi name: httpRoute.Destination.Name, settings: httpRoute.Destination.Settings, tSocket: nil, - protocol: protocol, endpointType: Static, loadBalancer: httpRoute.LoadBalancer, }); err != nil && !errors.Is(err, ErrXdsClusterExists) { @@ -229,7 +223,6 @@ func (t *Translator) processHTTPListenerXdsTranslation(tCtx *types.ResourceVersi name: mirrorDest.Name, settings: mirrorDest.Settings, tSocket: nil, - protocol: protocol, endpointType: Static, }); err != nil && !errors.Is(err, ErrXdsClusterExists) { return err @@ -276,7 +269,6 @@ func processTCPListenerXdsTranslation(tCtx *types.ResourceVersionTable, tcpListe name: tcpListener.Destination.Name, settings: tcpListener.Destination.Settings, tSocket: nil, - protocol: DefaultProtocol, endpointType: Static, }); err != nil && !errors.Is(err, ErrXdsClusterExists) { return err @@ -313,7 +305,6 @@ func processUDPListenerXdsTranslation(tCtx *types.ResourceVersionTable, udpListe name: udpListener.Destination.Name, settings: udpListener.Destination.Settings, tSocket: nil, - protocol: DefaultProtocol, endpointType: Static, }); err != nil && !errors.Is(err, ErrXdsClusterExists) { return err @@ -442,22 +433,12 @@ type xdsClusterArgs struct { name string settings []*ir.DestinationSetting tSocket *corev3.TransportSocket - protocol ProtocolType endpointType EndpointType loadBalancer *ir.LoadBalancer } -type ProtocolType int type EndpointType int -const ( - DefaultProtocol ProtocolType = iota - TCP - UDP - HTTP - HTTP2 -) - const ( DefaultEndpointType EndpointType = iota Static diff --git a/test/conformance/conformance_test.go b/test/conformance/conformance_test.go index 0e08a5a1ad1..da88413075e 100644 --- a/test/conformance/conformance_test.go +++ b/test/conformance/conformance_test.go @@ -50,7 +50,6 @@ func TestGatewayAPIConformance(t *testing.T) { SkipTests: []string{ tests.GatewayStaticAddresses.ShortName, tests.GatewayWithAttachedRoutes.ShortName, - tests.HTTPRouteBackendProtocolH2C.ShortName, }, ExemptFeatures: suite.MeshCoreFeatures, }) diff --git a/test/conformance/experimental_conformance_test.go b/test/conformance/experimental_conformance_test.go index a6a308cbbce..c5eae8f2dba 100644 --- a/test/conformance/experimental_conformance_test.go +++ b/test/conformance/experimental_conformance_test.go @@ -99,7 +99,6 @@ func experimentalConformance(t *testing.T) { SkipTests: []string{ tests.GatewayStaticAddresses.ShortName, tests.GatewayWithAttachedRoutes.ShortName, - tests.HTTPRouteBackendProtocolH2C.ShortName, }, ExemptFeatures: suite.MeshCoreFeatures, },