diff --git a/internal/cmd/egctl/testdata/translate/in/default-resources.yaml b/internal/cmd/egctl/testdata/translate/in/default-resources.yaml index bf2af30da4..91a413c4b1 100644 --- a/internal/cmd/egctl/testdata/translate/in/default-resources.yaml +++ b/internal/cmd/egctl/testdata/translate/in/default-resources.yaml @@ -109,6 +109,7 @@ spec: name: providedBackend port: 8000 weight: 1 + name: rule-1 matches: - path: type: PathPrefix diff --git a/internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml b/internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml index 0d0906fa80..e1c8190985 100644 --- a/internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml +++ b/internal/cmd/egctl/testdata/translate/out/default-resources.all.yaml @@ -446,6 +446,7 @@ httpRoutes: - path: type: PathPrefix value: / + name: rule-1 status: parents: - conditions: @@ -787,6 +788,14 @@ xds: loadBalancingWeight: 1 locality: region: httproute/default/backend/rule/0/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: providedBackend + namespace: default + sectionName: "8000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: grpcroute/default/backend/rule/0 @@ -801,6 +810,14 @@ xds: loadBalancingWeight: 1 locality: region: grpcroute/default/backend/rule/0/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: providedBackend + namespace: default + sectionName: "9000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: tcproute/default/backend/rule/-1 @@ -815,6 +832,14 @@ xds: loadBalancingWeight: 1 locality: region: tcproute/default/backend/rule/-1/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: tlsroute/default/backend/rule/-1 @@ -829,6 +854,14 @@ xds: loadBalancingWeight: 1 locality: region: tlsroute/default/backend/rule/-1/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: udproute/default/backend/rule/-1 @@ -843,6 +876,14 @@ xds: loadBalancingWeight: 1 locality: region: udproute/default/backend/rule/-1/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - '@type': type.googleapis.com/envoy.admin.v3.ClustersConfigDump dynamicActiveClusters: - cluster: @@ -861,6 +902,14 @@ xds: serviceName: httproute/default/backend/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: HTTPRoute + name: backend + namespace: default + sectionName: rule-1 name: httproute/default/backend/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS @@ -880,6 +929,13 @@ xds: serviceName: grpcroute/default/backend/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: GRPCRoute + name: backend + namespace: default name: grpcroute/default/backend/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS @@ -906,6 +962,13 @@ xds: serviceName: tcproute/default/backend/rule/-1 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: TCPRoute + name: backend + namespace: default name: tcproute/default/backend/rule/-1 perConnectionBufferLimitBytes: 32768 type: EDS @@ -925,6 +988,13 @@ xds: serviceName: tlsroute/default/backend/rule/-1 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: TLSRoute + name: backend + namespace: default name: tlsroute/default/backend/rule/-1 perConnectionBufferLimitBytes: 32768 type: EDS @@ -944,6 +1014,13 @@ xds: serviceName: udproute/default/backend/rule/-1 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: UDPRoute + name: backend + namespace: default name: udproute/default/backend/rule/-1 perConnectionBufferLimitBytes: 32768 type: EDS @@ -1490,6 +1567,7 @@ xds: - kind: HTTPRoute name: backend namespace: default + sectionName: rule-1 name: httproute/default/backend/rule/0/match/0/www_example_com route: cluster: httproute/default/backend/rule/0 diff --git a/internal/cmd/egctl/testdata/translate/out/echo-gateway-api.cluster.yaml b/internal/cmd/egctl/testdata/translate/out/echo-gateway-api.cluster.yaml index d04f71dc7c..1fa83bfd36 100644 --- a/internal/cmd/egctl/testdata/translate/out/echo-gateway-api.cluster.yaml +++ b/internal/cmd/egctl/testdata/translate/out/echo-gateway-api.cluster.yaml @@ -117,6 +117,13 @@ xds: serviceName: httproute/envoy-gateway-system/backend/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: HTTPRoute + name: backend + namespace: envoy-gateway-system name: httproute/envoy-gateway-system/backend/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS diff --git a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.json b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.json index 02d31b5b08..ac020e294a 100644 --- a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.json +++ b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.json @@ -358,6 +358,20 @@ "loadBalancingWeight": 1, "locality": { "region": "httproute/default/backend/rule/0/backend/0" + }, + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "Service", + "name": "backend", + "namespace": "default", + "sectionName": "3000" + } + ] + } + } } } ] @@ -385,6 +399,20 @@ "loadBalancingWeight": 1, "locality": { "region": "grpcroute/default/backend/rule/0/backend/0" + }, + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "Service", + "name": "backend", + "namespace": "default", + "sectionName": "9000" + } + ] + } + } } } ] @@ -412,6 +440,20 @@ "loadBalancingWeight": 1, "locality": { "region": "tcproute/default/backend/rule/-1/backend/0" + }, + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "Service", + "name": "backend", + "namespace": "default", + "sectionName": "3000" + } + ] + } + } } } ] @@ -439,6 +481,20 @@ "loadBalancingWeight": 1, "locality": { "region": "tlsroute/default/backend/rule/-1/backend/0" + }, + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "Service", + "name": "backend", + "namespace": "default", + "sectionName": "3000" + } + ] + } + } } } ] @@ -466,6 +522,20 @@ "loadBalancingWeight": 1, "locality": { "region": "udproute/default/backend/rule/-1/backend/0" + }, + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "Service", + "name": "backend", + "namespace": "default", + "sectionName": "3000" + } + ] + } + } } } ] @@ -500,6 +570,19 @@ }, "ignoreHealthOnHostRemoval": true, "lbPolicy": "LEAST_REQUEST", + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "HTTPRoute", + "name": "backend", + "namespace": "default" + } + ] + } + } + }, "name": "httproute/default/backend/rule/0", "perConnectionBufferLimitBytes": 32768, "type": "EDS" @@ -529,6 +612,19 @@ }, "ignoreHealthOnHostRemoval": true, "lbPolicy": "LEAST_REQUEST", + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "GRPCRoute", + "name": "backend", + "namespace": "default" + } + ] + } + } + }, "name": "grpcroute/default/backend/rule/0", "perConnectionBufferLimitBytes": 32768, "type": "EDS", @@ -569,6 +665,19 @@ }, "ignoreHealthOnHostRemoval": true, "lbPolicy": "LEAST_REQUEST", + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "TCPRoute", + "name": "backend", + "namespace": "default" + } + ] + } + } + }, "name": "tcproute/default/backend/rule/-1", "perConnectionBufferLimitBytes": 32768, "type": "EDS" @@ -598,6 +707,19 @@ }, "ignoreHealthOnHostRemoval": true, "lbPolicy": "LEAST_REQUEST", + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "TLSRoute", + "name": "backend", + "namespace": "default" + } + ] + } + } + }, "name": "tlsroute/default/backend/rule/-1", "perConnectionBufferLimitBytes": 32768, "type": "EDS" @@ -627,6 +749,19 @@ }, "ignoreHealthOnHostRemoval": true, "lbPolicy": "LEAST_REQUEST", + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "UDPRoute", + "name": "backend", + "namespace": "default" + } + ] + } + } + }, "name": "udproute/default/backend/rule/-1", "perConnectionBufferLimitBytes": 32768, "type": "EDS" diff --git a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml index 2712f90cf2..c8ddd01d8b 100644 --- a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml +++ b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.all.yaml @@ -204,6 +204,14 @@ xds: loadBalancingWeight: 1 locality: region: httproute/default/backend/rule/0/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: grpcroute/default/backend/rule/0 @@ -218,6 +226,14 @@ xds: loadBalancingWeight: 1 locality: region: grpcroute/default/backend/rule/0/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "9000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: tcproute/default/backend/rule/-1 @@ -232,6 +248,14 @@ xds: loadBalancingWeight: 1 locality: region: tcproute/default/backend/rule/-1/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: tlsroute/default/backend/rule/-1 @@ -246,6 +270,14 @@ xds: loadBalancingWeight: 1 locality: region: tlsroute/default/backend/rule/-1/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: udproute/default/backend/rule/-1 @@ -260,6 +292,14 @@ xds: loadBalancingWeight: 1 locality: region: udproute/default/backend/rule/-1/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - '@type': type.googleapis.com/envoy.admin.v3.ClustersConfigDump dynamicActiveClusters: - cluster: @@ -278,6 +318,13 @@ xds: serviceName: httproute/default/backend/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: HTTPRoute + name: backend + namespace: default name: httproute/default/backend/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS @@ -297,6 +344,13 @@ xds: serviceName: grpcroute/default/backend/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: GRPCRoute + name: backend + namespace: default name: grpcroute/default/backend/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS @@ -323,6 +377,13 @@ xds: serviceName: tcproute/default/backend/rule/-1 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: TCPRoute + name: backend + namespace: default name: tcproute/default/backend/rule/-1 perConnectionBufferLimitBytes: 32768 type: EDS @@ -342,6 +403,13 @@ xds: serviceName: tlsroute/default/backend/rule/-1 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: TLSRoute + name: backend + namespace: default name: tlsroute/default/backend/rule/-1 perConnectionBufferLimitBytes: 32768 type: EDS @@ -361,6 +429,13 @@ xds: serviceName: udproute/default/backend/rule/-1 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: UDPRoute + name: backend + namespace: default name: udproute/default/backend/rule/-1 perConnectionBufferLimitBytes: 32768 type: EDS diff --git a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.cluster.yaml b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.cluster.yaml index d171965d1c..64b13a3882 100644 --- a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.cluster.yaml +++ b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.cluster.yaml @@ -18,6 +18,13 @@ xds: serviceName: httproute/default/backend/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: HTTPRoute + name: backend + namespace: default name: httproute/default/backend/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS @@ -37,6 +44,13 @@ xds: serviceName: grpcroute/default/backend/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: GRPCRoute + name: backend + namespace: default name: grpcroute/default/backend/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS @@ -63,6 +77,13 @@ xds: serviceName: tcproute/default/backend/rule/-1 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: TCPRoute + name: backend + namespace: default name: tcproute/default/backend/rule/-1 perConnectionBufferLimitBytes: 32768 type: EDS @@ -82,6 +103,13 @@ xds: serviceName: tlsroute/default/backend/rule/-1 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: TLSRoute + name: backend + namespace: default name: tlsroute/default/backend/rule/-1 perConnectionBufferLimitBytes: 32768 type: EDS @@ -101,6 +129,13 @@ xds: serviceName: udproute/default/backend/rule/-1 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: UDPRoute + name: backend + namespace: default name: udproute/default/backend/rule/-1 perConnectionBufferLimitBytes: 32768 type: EDS diff --git a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.endpoint.yaml b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.endpoint.yaml index 04b9540b97..43759a2a0c 100644 --- a/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.endpoint.yaml +++ b/internal/cmd/egctl/testdata/translate/out/from-gateway-api-to-xds.endpoint.yaml @@ -16,6 +16,14 @@ xds: loadBalancingWeight: 1 locality: region: httproute/default/backend/rule/0/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: grpcroute/default/backend/rule/0 @@ -30,6 +38,14 @@ xds: loadBalancingWeight: 1 locality: region: grpcroute/default/backend/rule/0/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "9000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: tcproute/default/backend/rule/-1 @@ -44,6 +60,14 @@ xds: loadBalancingWeight: 1 locality: region: tcproute/default/backend/rule/-1/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: tlsroute/default/backend/rule/-1 @@ -58,6 +82,14 @@ xds: loadBalancingWeight: 1 locality: region: tlsroute/default/backend/rule/-1/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" - endpointConfig: '@type': type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment clusterName: udproute/default/backend/rule/-1 @@ -72,3 +104,11 @@ xds: loadBalancingWeight: 1 locality: region: udproute/default/backend/rule/-1/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: default + sectionName: "3000" diff --git a/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.json b/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.json index ebe7031132..b7051f5469 100644 --- a/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.json +++ b/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.json @@ -358,6 +358,20 @@ "loadBalancingWeight": 1, "locality": { "region": "httproute/envoy-gateway-system/backend/rule/0/backend/0" + }, + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "Service", + "name": "backend", + "namespace": "envoy-gateway-system", + "sectionName": "3000" + } + ] + } + } } } ] @@ -392,6 +406,19 @@ }, "ignoreHealthOnHostRemoval": true, "lbPolicy": "LEAST_REQUEST", + "metadata": { + "filterMetadata": { + "envoy-gateway": { + "resources": [ + { + "kind": "HTTPRoute", + "name": "backend", + "namespace": "envoy-gateway-system" + } + ] + } + } + }, "name": "httproute/envoy-gateway-system/backend/rule/0", "perConnectionBufferLimitBytes": 32768, "type": "EDS" diff --git a/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.yaml b/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.yaml index db49a3e7a0..f56c075117 100644 --- a/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.yaml +++ b/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.all.yaml @@ -204,6 +204,14 @@ xds: loadBalancingWeight: 1 locality: region: httproute/envoy-gateway-system/backend/rule/0/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: envoy-gateway-system + sectionName: "3000" - '@type': type.googleapis.com/envoy.admin.v3.ClustersConfigDump dynamicActiveClusters: - cluster: @@ -222,6 +230,13 @@ xds: serviceName: httproute/envoy-gateway-system/backend/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: HTTPRoute + name: backend + namespace: envoy-gateway-system name: httproute/envoy-gateway-system/backend/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS diff --git a/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.cluster.yaml b/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.cluster.yaml index 08240b7eac..e84d41dcad 100644 --- a/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.cluster.yaml +++ b/internal/cmd/egctl/testdata/translate/out/jwt-single-route-single-match-to-xds.cluster.yaml @@ -18,6 +18,13 @@ xds: serviceName: httproute/envoy-gateway-system/backend/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: HTTPRoute + name: backend + namespace: envoy-gateway-system name: httproute/envoy-gateway-system/backend/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS diff --git a/internal/cmd/egctl/testdata/translate/out/no-service-cluster-ip.all.yaml b/internal/cmd/egctl/testdata/translate/out/no-service-cluster-ip.all.yaml index 6aaf2f1a86..b3e3bda8c0 100644 --- a/internal/cmd/egctl/testdata/translate/out/no-service-cluster-ip.all.yaml +++ b/internal/cmd/egctl/testdata/translate/out/no-service-cluster-ip.all.yaml @@ -204,6 +204,14 @@ xds: loadBalancingWeight: 1 locality: region: httproute/envoy-gateway-system/routes/rule/0/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: backend + namespace: envoy-gateway-system + sectionName: "8080" - '@type': type.googleapis.com/envoy.admin.v3.ClustersConfigDump dynamicActiveClusters: - cluster: @@ -222,6 +230,13 @@ xds: serviceName: httproute/envoy-gateway-system/routes/rule/0 ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: HTTPRoute + name: routes + namespace: envoy-gateway-system name: httproute/envoy-gateway-system/routes/rule/0 perConnectionBufferLimitBytes: 32768 type: EDS diff --git a/internal/cmd/egctl/testdata/translate/out/quickstart.all.yaml b/internal/cmd/egctl/testdata/translate/out/quickstart.all.yaml index c7b1dca08e..26bdeff5a5 100644 --- a/internal/cmd/egctl/testdata/translate/out/quickstart.all.yaml +++ b/internal/cmd/egctl/testdata/translate/out/quickstart.all.yaml @@ -121,11 +121,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: backend + namespace: envoy-gateway-system name: httproute/envoy-gateway-system/backend/rule/0 settings: - endpoints: - host: 7.7.7.7 port: 3000 + metadata: + kind: Service + name: backend + namespace: envoy-gateway-system + sectionName: "3000" name: httproute/envoy-gateway-system/backend/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/ext_service.go b/internal/gatewayapi/ext_service.go index 2665497d32..32ee19c2ea 100644 --- a/internal/gatewayapi/ext_service.go +++ b/internal/gatewayapi/ext_service.go @@ -72,6 +72,7 @@ func (t *Translator) translateExtServiceBackendRefs( rs = &ir.RouteDestination{ Name: destName, Settings: ds, + Metadata: buildResourceMetadata(policy, nil), } if validationErr := rs.Validate(); validationErr != nil { diff --git a/internal/gatewayapi/listener.go b/internal/gatewayapi/listener.go index 9f2fb5de26..5efc03f4b1 100644 --- a/internal/gatewayapi/listener.go +++ b/internal/gatewayapi/listener.go @@ -562,6 +562,7 @@ func (t *Translator) processAccessLog(envoyproxy *egv1a1.EnvoyProxy, resources * Destination: ir.RouteDestination{ Name: destName, Settings: ds, + Metadata: buildResourceMetadata(envoyproxy, nil), }, Traffic: traffic, Type: sink.ALS.Type, @@ -605,6 +606,7 @@ func (t *Translator) processAccessLog(envoyproxy *egv1a1.EnvoyProxy, resources * Destination: ir.RouteDestination{ Name: destName, Settings: ds, + Metadata: buildResourceMetadata(envoyproxy, nil), }, Traffic: traffic, LogType: accessLogType, @@ -681,6 +683,7 @@ func (t *Translator) processTracing(gw *gwapiv1.Gateway, envoyproxy *egv1a1.Envo Destination: ir.RouteDestination{ Name: destName, Settings: ds, + Metadata: buildResourceMetadata(envoyproxy, nil), }, Provider: tracing.Provider, Traffic: traffic, diff --git a/internal/gatewayapi/route.go b/internal/gatewayapi/route.go index b98e81a465..39ef6d7c83 100644 --- a/internal/gatewayapi/route.go +++ b/internal/gatewayapi/route.go @@ -17,6 +17,7 @@ import ( discoveryv1 "k8s.io/api/discovery/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" + "sigs.k8s.io/controller-runtime/pkg/client" gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" mcsapiv1a1 "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" @@ -250,6 +251,7 @@ func (t *Translator) processHTTPRouteRules(httpRoute *HTTPRouteContext, parentRe for _, irRoute := range ruleRoutes { destination := &ir.RouteDestination{ Settings: allDs, + Metadata: buildResourceMetadata(httpRoute, rule.Name), } switch { @@ -380,7 +382,7 @@ func (t *Translator) processHTTPRouteRule( irRoute := &ir.HTTPRoute{ Name: irRouteName(httpRoute, ruleIdx, -1), } - irRoute.Metadata = buildRouteMetadata(httpRoute, rule.Name) + irRoute.Metadata = buildResourceMetadata(httpRoute, rule.Name) processRouteTrafficFeatures(irRoute, rule) applyHTTPFiltersContextToIRRoute(httpFiltersContext, irRoute) ruleRoutes = append(ruleRoutes, irRoute) @@ -447,7 +449,7 @@ func (t *Translator) processHTTPRouteRule( Name: irRouteName(httpRoute, ruleIdx, matchIdx), SessionPersistence: sessionPersistence, } - irRoute.Metadata = buildRouteMetadata(httpRoute, rule.Name) + irRoute.Metadata = buildResourceMetadata(httpRoute, rule.Name) processRouteTrafficFeatures(irRoute, rule) if match.Path != nil { @@ -675,6 +677,7 @@ func (t *Translator) processGRPCRouteRules(grpcRoute *GRPCRouteContext, parentRe irRoute.IsHTTP2 = true destination := &ir.RouteDestination{ Settings: allDs, + Metadata: buildResourceMetadata(grpcRoute, rule.Name), } switch { @@ -720,7 +723,7 @@ func (t *Translator) processGRPCRouteRule(grpcRoute *GRPCRouteContext, ruleIdx i irRoute := &ir.HTTPRoute{ Name: irRouteName(grpcRoute, ruleIdx, -1), } - irRoute.Metadata = buildRouteMetadata(grpcRoute, rule.Name) + irRoute.Metadata = buildResourceMetadata(grpcRoute, rule.Name) applyHTTPFiltersContextToIRRoute(httpFiltersContext, irRoute) ruleRoutes = append(ruleRoutes, irRoute) } @@ -732,7 +735,7 @@ func (t *Translator) processGRPCRouteRule(grpcRoute *GRPCRouteContext, ruleIdx i irRoute := &ir.HTTPRoute{ Name: irRouteName(grpcRoute, ruleIdx, matchIdx), } - irRoute.Metadata = buildRouteMetadata(grpcRoute, rule.Name) + irRoute.Metadata = buildResourceMetadata(grpcRoute, rule.Name) for _, headerMatch := range match.Headers { switch GRPCHeaderMatchTypeDerefOr(headerMatch.Type, gwapiv1.GRPCHeaderMatchExact) { case gwapiv1.GRPCHeaderMatchExact: @@ -866,12 +869,12 @@ func (t *Translator) processHTTPRouteParentRefListener(route RouteContext, route return hasHostnameIntersection } -func buildRouteMetadata(route RouteContext, sectionName *gwapiv1.SectionName) *ir.ResourceMetadata { +func buildResourceMetadata(resource client.Object, sectionName *gwapiv1.SectionName) *ir.ResourceMetadata { metadata := &ir.ResourceMetadata{ - Kind: route.GetObjectKind().GroupVersionKind().Kind, - Name: route.GetName(), - Namespace: route.GetNamespace(), - Annotations: filterEGPrefix(route.GetAnnotations()), + Kind: resource.GetObjectKind().GroupVersionKind().Kind, + Name: resource.GetName(), + Namespace: resource.GetNamespace(), + Annotations: filterEGPrefix(resource.GetAnnotations()), } if sectionName != nil { metadata.SectionName = string(*sectionName) @@ -1000,6 +1003,7 @@ func (t *Translator) processTLSRouteParentRefs(tlsRoute *TLSRouteContext, resour Destination: &ir.RouteDestination{ Name: destName, Settings: destSettings, + Metadata: buildResourceMetadata(tlsRoute, nil), }, } irListener.Routes = append(irListener.Routes, irRoute) @@ -1160,6 +1164,7 @@ func (t *Translator) processUDPRouteParentRefs(udpRoute *UDPRouteContext, resour Destination: &ir.RouteDestination{ Name: destName, Settings: destSettings, + Metadata: buildResourceMetadata(udpRoute, nil), }, } irListener.Route = irRoute @@ -1308,6 +1313,7 @@ func (t *Translator) processTCPRouteParentRefs(tcpRoute *TCPRouteContext, resour Destination: &ir.RouteDestination{ Name: destName, Settings: destSettings, + Metadata: buildResourceMetadata(tcpRoute, nil), }, } @@ -1518,6 +1524,7 @@ func (t *Translator) processServiceImportDestinationSetting( Protocol: protocol, Endpoints: endpoints, AddressType: addrType, + Metadata: buildResourceMetadata(serviceImport, ptr.To(gwapiv1.SectionName(strconv.Itoa(int(*backendRef.Port))))), } } @@ -1564,6 +1571,7 @@ func (t *Translator) processServiceDestinationSetting( Endpoints: endpoints, AddressType: addrType, ZoneAwareRoutingEnabled: isZoneAwareRoutingEnabled(service), + Metadata: buildResourceMetadata(service, ptr.To(gwapiv1.SectionName(strconv.Itoa(int(*backendRef.Port))))), } } @@ -1949,6 +1957,8 @@ func (t *Translator) processBackendDestinationSetting( } } + ds.Metadata = buildResourceMetadata(backend, nil) + return ds } diff --git a/internal/gatewayapi/testdata/accesslog-als-backend.out.yaml b/internal/gatewayapi/testdata/accesslog-als-backend.out.yaml index 1b887dc111..7f2bba5b83 100644 --- a/internal/gatewayapi/testdata/accesslog-als-backend.out.yaml +++ b/internal/gatewayapi/testdata/accesslog-als-backend.out.yaml @@ -154,6 +154,10 @@ xdsIR: accessLog: openTelemetry: - destination: + metadata: + kind: EnvoyProxy + name: als-backend + namespace: envoy-gateway-system name: accesslog_otel_0_0 settings: - addressType: IP @@ -161,18 +165,30 @@ xdsIR: - host: "" path: /var/run/backend.sock port: 0 + metadata: + kind: Backend + name: backend-uds + namespace: envoy-gateway name: accesslog_otel_0_0/backend/-1 protocol: TCP - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: envoy-gateway name: accesslog_otel_0_0/backend/-1 protocol: HTTP2 - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: envoy-gateway name: accesslog_otel_0_0/backend/-1 protocol: TCP resources: diff --git a/internal/gatewayapi/testdata/backend-with-fallback.out.yaml b/internal/gatewayapi/testdata/backend-with-fallback.out.yaml index bc89291d78..977bdd3197 100644 --- a/internal/gatewayapi/testdata/backend-with-fallback.out.yaml +++ b/internal/gatewayapi/testdata/backend-with-fallback.out.yaml @@ -155,12 +155,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-1 + namespace: default name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -168,6 +176,10 @@ xdsIR: endpoints: - host: 2.2.2.2 port: 3001 + metadata: + kind: Backend + name: backend-2 + namespace: default name: httproute/default/httproute-1/rule/0/backend/1 priority: 1 protocol: HTTP diff --git a/internal/gatewayapi/testdata/backendtlspolicy-across-ns.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-across-ns.out.yaml index 36c1a79cfe..cd42106c11 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-across-ns.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-across-ns.out.yaml @@ -138,12 +138,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: backends + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtlspolicy-ca-only-secret.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-ca-only-secret.out.yaml index d718bc4177..fa8d5bc971 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-ca-only-secret.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-ca-only-secret.out.yaml @@ -149,12 +149,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: backends + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 protocol: HTTP tls: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-ca-only.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-ca-only.out.yaml index af37c14f36..545df2dd7c 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-ca-only.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-ca-only.out.yaml @@ -149,12 +149,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: backends + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 protocol: HTTP tls: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-default-ns-targetrefs.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-default-ns-targetrefs.out.yaml index b20a2dd758..2fea230002 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-default-ns-targetrefs.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-default-ns-targetrefs.out.yaml @@ -284,12 +284,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: default + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 protocol: HTTP tls: @@ -303,6 +312,10 @@ xdsIR: endpoints: - host: 2.2.2.2 port: 3443 + metadata: + kind: Backend + name: backend-ip-tls + namespace: default name: httproute/envoy-gateway/httproute-btls/rule/0/backend/1 protocol: HTTP tls: @@ -349,12 +362,21 @@ xdsIR: port: 10081 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls2 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls2/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: default + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls2/rule/0/backend/0 protocol: HTTP tls: @@ -368,6 +390,10 @@ xdsIR: endpoints: - host: 2.2.2.2 port: 3443 + metadata: + kind: Backend + name: backend-ip-tls + namespace: default name: httproute/envoy-gateway/httproute-btls2/rule/0/backend/1 protocol: HTTP tls: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-default-ns.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-default-ns.out.yaml index e360cccbbb..800186c9c6 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-default-ns.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-default-ns.out.yaml @@ -244,12 +244,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: default + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 protocol: HTTP tls: @@ -263,6 +272,10 @@ xdsIR: endpoints: - host: 2.2.2.2 port: 3443 + metadata: + kind: Backend + name: backend-ip-tls-1 + namespace: default name: httproute/envoy-gateway/httproute-btls/rule/0/backend/1 protocol: HTTP tls: @@ -276,6 +289,10 @@ xdsIR: endpoints: - host: 3.3.3.3 port: 3443 + metadata: + kind: Backend + name: backend-ip-tls-2 + namespace: default name: httproute/envoy-gateway/httproute-btls/rule/0/backend/2 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtlspolicy-multiple-targets.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-multiple-targets.out.yaml index 0cd2d81d70..bd8e3f12e2 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-multiple-targets.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-multiple-targets.out.yaml @@ -191,12 +191,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls-1/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls-1/rule/0/backend/0 protocol: HTTP tls: @@ -218,12 +227,21 @@ xdsIR: exact: /exact-1 name: "" - destination: + metadata: + kind: HTTPRoute + name: httproute-btls-2 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls-2/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8081 + metadata: + kind: Service + name: http-backend + namespace: envoy-gateway + sectionName: "8081" name: httproute/envoy-gateway/httproute-btls-2/rule/0/backend/0 protocol: HTTP tls: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-serviceimport-target.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-serviceimport-target.out.yaml index 94121f5794..28c2ad5ba1 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-serviceimport-target.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-serviceimport-target.out.yaml @@ -157,12 +157,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: ServiceImport + name: service-import-1 + namespace: default + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 protocol: HTTP2 tls: @@ -176,6 +185,11 @@ xdsIR: endpoints: - host: 10.244.0.11 port: 9000 + metadata: + kind: ServiceImport + name: service-import-1 + namespace: default + sectionName: "9000" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/1 protocol: HTTP tls: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-subjectaltnames.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-subjectaltnames.out.yaml index 215860c4ea..8eb8b38557 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-subjectaltnames.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-subjectaltnames.out.yaml @@ -154,12 +154,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: backends + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 protocol: HTTP tls: diff --git a/internal/gatewayapi/testdata/backendtlspolicy-system-truststore.out.yaml b/internal/gatewayapi/testdata/backendtlspolicy-system-truststore.out.yaml index 6c300999c8..a6f7f92022 100644 --- a/internal/gatewayapi/testdata/backendtlspolicy-system-truststore.out.yaml +++ b/internal/gatewayapi/testdata/backendtlspolicy-system-truststore.out.yaml @@ -146,12 +146,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-btls + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-btls/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: default + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 protocol: HTTP tls: diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit-out-of-range-error.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit-out-of-range-error.out.yaml index 8906c3c116..3c941bd0d0 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit-out-of-range-error.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit-out-of-range-error.out.yaml @@ -267,12 +267,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -316,12 +324,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit-with-invalid-value.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit-with-invalid-value.out.yaml index 55f4c88547..d477bf8f20 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit-with-invalid-value.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit-with-invalid-value.out.yaml @@ -267,12 +267,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -316,12 +324,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit.out.yaml index b3d716c811..1095a0e12d 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-buffer-limit.out.yaml @@ -267,12 +267,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -316,12 +324,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-compression.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-compression.out.yaml index df89978b39..4ef79dd3dd 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-compression.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-compression.out.yaml @@ -147,12 +147,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-dns-lookup-family.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-dns-lookup-family.out.yaml index 0db7d5ab16..20b994d1d6 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-dns-lookup-family.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-dns-lookup-family.out.yaml @@ -350,9 +350,18 @@ xdsIR: accessLog: openTelemetry: - destination: + metadata: + kind: EnvoyProxy + name: config-for-gateway-class + namespace: envoy-gateway name: accesslog_otel_0_1 settings: - - name: accesslog_otel_0_1/backend/-1 + - metadata: + kind: Service + name: logs + namespace: default + sectionName: "8080" + name: accesslog_otel_0_1/backend/-1 protocol: TCP resources: k8s.cluster.name: cluster-1 @@ -383,12 +392,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: FQDN endpoints: - host: grpc-infra-backend.gateway-conformance-infra.svc.cluster.local port: 8080 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -396,12 +413,20 @@ xdsIR: extProcs: - authority: backend-fqdn2.default:9090 destination: + metadata: + kind: EnvoyExtensionPolicy + name: policy-for-httproute + namespace: default name: envoyextensionpolicy/default/policy-for-httproute/extproc/0 settings: - addressType: FQDN endpoints: - host: backend-v2.gateway-conformance-infra.svc.cluster.local port: 9090 + metadata: + kind: Backend + name: backend-fqdn2 + namespace: default name: envoyextensionpolicy/default/policy-for-httproute/extproc/0/backend/0 protocol: GRPC weight: 1 @@ -429,12 +454,20 @@ xdsIR: http: authority: backend-v3.gateway-conformance-infra.svc.cluster.local:8080 destination: + metadata: + kind: SecurityPolicy + name: policy-for-gateway-1 + namespace: envoy-gateway name: securitypolicy/envoy-gateway/policy-for-gateway-1/extauth/0 settings: - addressType: FQDN endpoints: - host: backend-v3.gateway-conformance-infra.svc.cluster.local port: 8080 + metadata: + kind: Backend + name: backend-fqdn3 + namespace: default name: securitypolicy/envoy-gateway/policy-for-gateway-1/extauth/0/backend/0 protocol: HTTP weight: 1 @@ -450,12 +483,20 @@ xdsIR: lookupFamily: IPv6 respectDnsTtl: false - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: FQDN endpoints: - host: grpc-infra-backend.gateway-conformance-infra.svc.cluster.local port: 8080 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -474,12 +515,20 @@ xdsIR: http: authority: backend-v3.gateway-conformance-infra.svc.cluster.local:8080 destination: + metadata: + kind: SecurityPolicy + name: policy-for-gateway-1 + namespace: envoy-gateway name: securitypolicy/envoy-gateway/policy-for-gateway-1/extauth/0 settings: - addressType: FQDN endpoints: - host: backend-v3.gateway-conformance-infra.svc.cluster.local port: 8080 + metadata: + kind: Backend + name: backend-fqdn3 + namespace: default name: securitypolicy/envoy-gateway/policy-for-gateway-1/extauth/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-http-upgrade-spdy.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-http-upgrade-spdy.out.yaml index 1903430df1..8b288cd478 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-http-upgrade-spdy.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-http-upgrade-spdy.out.yaml @@ -146,12 +146,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-http-upgrade-websocket.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-http-upgrade-websocket.out.yaml index 5e43ac6652..6c8c57c8ae 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-http-upgrade-websocket.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-http-upgrade-websocket.out.yaml @@ -147,12 +147,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-override-replace.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-override-replace.out.yaml index ad527fceec..8109d0bcaa 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-override-replace.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-override-replace.out.yaml @@ -289,12 +289,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -314,12 +322,20 @@ xdsIR: consistentHash: sourceIP: true - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -344,12 +360,20 @@ xdsIR: tcp: connectTimeout: 20s - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-request-buffer.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-request-buffer.out.yaml index 4b0955aab6..1a5e98d7a9 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-request-buffer.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-request-buffer.out.yaml @@ -267,12 +267,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -316,12 +324,20 @@ xdsIR: port: 8080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml index daf9e5d208..831dfc2ec1 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-status-conditions.out.yaml @@ -564,12 +564,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -611,12 +620,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: envoy-gateway name: grpcroute/envoy-gateway/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: grpcroute/envoy-gateway/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml index 41e2c5a0cc..cadb46862a 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-status-fault-injection.out.yaml @@ -347,12 +347,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -397,12 +405,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -423,12 +439,20 @@ xdsIR: httpStatus: 14 percentage: 0.01 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-global-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-global-ratelimit.out.yaml index 19958cfec3..ab4cd43f3e 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-global-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-global-ratelimit.out.yaml @@ -322,12 +322,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -406,12 +414,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-local-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-local-ratelimit.out.yaml index e0eb784ada..0593305633 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-local-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-local-ratelimit.out.yaml @@ -315,12 +315,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -395,12 +403,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-with-multi-parents.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-with-multi-parents.out.yaml index 1c466803e1..cbb3471608 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-with-multi-parents.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge-with-multi-parents.out.yaml @@ -291,12 +291,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -349,12 +357,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge.out.yaml index f7cdccc6c8..1cad529e8a 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-strategic-merge.out.yaml @@ -271,12 +271,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -304,12 +312,20 @@ xdsIR: tcp: connectTimeout: 10s - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-tracing.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-tracing.out.yaml index c1996019f4..822fc20f11 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-tracing.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-tracing.out.yaml @@ -164,12 +164,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-use-client-protocol.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-use-client-protocol.out.yaml index d3cb4bdd73..2fa5151586 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-use-client-protocol.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-use-client-protocol.out.yaml @@ -144,12 +144,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml index bb69134d19..a1c0f08477 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers-error.out.yaml @@ -329,12 +329,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -373,12 +381,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -396,12 +412,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml index 919e9fdb8e..b54e7d8204 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-circuitbreakers.out.yaml @@ -271,12 +271,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -320,12 +328,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-dns-settings.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-dns-settings.out.yaml index d42ca5614c..b2f77f6c93 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-dns-settings.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-dns-settings.out.yaml @@ -336,12 +336,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -386,12 +394,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -411,12 +427,20 @@ xdsIR: dnsRefreshRate: 5s respectDnsTtl: false - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml index 96dff6b971..a923135796 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-healthcheck.out.yaml @@ -696,12 +696,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -737,12 +745,20 @@ xdsIR: maxEjectionPercent: 100 splitExternalLocalOriginErrors: false - destination: + metadata: + kind: GRPCRoute + name: grpcroute-3 + namespace: default name: grpcroute/default/grpcroute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-3/rule/0/backend/0 protocol: GRPC weight: 1 @@ -763,12 +779,20 @@ xdsIR: timeout: 1s unhealthyThreshold: 3 - destination: + metadata: + kind: GRPCRoute + name: grpcroute-2 + namespace: default name: grpcroute/default/grpcroute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-2/rule/0/backend/0 protocol: GRPC weight: 1 @@ -813,12 +837,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -854,12 +886,20 @@ xdsIR: maxEjectionPercent: 10 splitExternalLocalOriginErrors: false - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -895,12 +935,20 @@ xdsIR: maxEjectionPercent: 11 splitExternalLocalOriginErrors: false - destination: + metadata: + kind: HTTPRoute + name: httproute-4 + namespace: default name: httproute/default/httproute-4/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-4/rule/0/backend/0 protocol: HTTP weight: 1 @@ -931,12 +979,20 @@ xdsIR: timeout: 1s unhealthyThreshold: 3 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-http2.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-http2.out.yaml index 9b75868372..fb00b3299a 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-http2.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-http2.out.yaml @@ -269,12 +269,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -317,12 +325,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-httproute-timeout.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-httproute-timeout.out.yaml index de18621593..5b1ca3dad4 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-httproute-timeout.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-httproute-timeout.out.yaml @@ -225,12 +225,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -249,12 +257,20 @@ xdsIR: traffic: {} useClientProtocol: true - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer-invalid-consistent-hash-table-size.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer-invalid-consistent-hash-table-size.out.yaml index e6ba0570d9..01dbe320f2 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer-invalid-consistent-hash-table-size.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer-invalid-consistent-hash-table-size.out.yaml @@ -218,12 +218,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -241,12 +249,20 @@ xdsIR: name: "" prefix: /test2 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml index 3a5678c79b..63a13b2f22 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-loadbalancer.out.yaml @@ -439,12 +439,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -484,12 +492,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -510,12 +526,20 @@ xdsIR: slowStart: window: 5m0s - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -536,12 +560,20 @@ xdsIR: cookie: name: test - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml index fffa3d8ef9..76199e15fa 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-default-route-level-limit.out.yaml @@ -167,12 +167,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-distinct-match-type.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-distinct-match-type.out.yaml index bb901670be..8667c44d9f 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-distinct-match-type.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-distinct-match-type.out.yaml @@ -167,12 +167,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml index 44d64303d6..6d74c31632 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-limit-unit.out.yaml @@ -171,12 +171,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml index c660523541..57f5c38611 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit-invalid-multiple-route-level-limits.out.yaml @@ -174,12 +174,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml index 7509c84446..7777bbd3e3 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-local-ratelimit.out.yaml @@ -170,12 +170,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-panic-threshold.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-panic-threshold.out.yaml index cb30f5b23c..ee0429d3d7 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-panic-threshold.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-panic-threshold.out.yaml @@ -333,12 +333,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -382,12 +390,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -406,12 +422,20 @@ xdsIR: healthCheck: panicThreshold: 10 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml index 45e87169d4..a07c7307d8 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-proxyprotocol.out.yaml @@ -263,12 +263,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -308,12 +316,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml index 1c77167996..42ce6b0ab1 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit-invalid-regex.out.yaml @@ -153,12 +153,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml index a19232df09..2cde5031c2 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-ratelimit.out.yaml @@ -300,12 +300,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -365,12 +373,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-response-override-invalid-valueref.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-response-override-invalid-valueref.out.yaml index a2790dc7ef..5ab2755bab 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-response-override-invalid-valueref.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-response-override-invalid-valueref.out.yaml @@ -312,12 +312,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -356,12 +364,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-response-override.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-response-override.out.yaml index 15c062a97b..07d1dbeeff 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-response-override.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-response-override.out.yaml @@ -382,12 +382,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -448,12 +456,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -493,12 +509,20 @@ xdsIR: } contentType: application/json - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-retries.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-retries.out.yaml index 5785fcf001..a94353272f 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-retries.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-retries.out.yaml @@ -419,12 +419,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -471,12 +479,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -494,12 +510,20 @@ xdsIR: name: "" prefix: /route2 - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -517,12 +541,20 @@ xdsIR: name: "" prefix: /route3 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml index d2ae6de9a4..32f6c67df7 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-same-prefix-httproutes.out.yaml @@ -186,12 +186,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -212,12 +220,20 @@ xdsIR: maxParallelRequests: 4294967295 maxPendingRequests: 1 - destination: + metadata: + kind: HTTPRoute + name: httproute-1-1 + namespace: default name: httproute/default/httproute-1-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-shared-ratelimit.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-shared-ratelimit.out.yaml index 283ee24b68..7ce1694106 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-shared-ratelimit.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-shared-ratelimit.out.yaml @@ -301,12 +301,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -367,12 +375,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcp-udp-listeners-apply-on-gateway.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcp-udp-listeners-apply-on-gateway.out.yaml index 71273aedf6..3b3da4fb6a 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcp-udp-listeners-apply-on-gateway.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcp-udp-listeners-apply-on-gateway.out.yaml @@ -250,12 +250,20 @@ xdsIR: maxPendingRequests: 1 maxRequestsPerConnection: 1 destination: + metadata: + kind: TCPRoute + name: tls-app-1 + namespace: default name: tcproute/default/tls-app-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8163 + metadata: + name: service-1 + namespace: default + sectionName: "8163" name: tcproute/default/tls-app-1/rule/-1/backend/0 protocol: TCP weight: 1 @@ -304,12 +312,20 @@ xdsIR: port: 8162 route: destination: + metadata: + kind: UDPRoute + name: udp-app-1 + namespace: default name: udproute/default/udp-app-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udp-app-1/rule/-1/backend/0 protocol: UDP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcp-udp-listeners-apply-on-route.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcp-udp-listeners-apply-on-route.out.yaml index ae11354d93..97428ff443 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcp-udp-listeners-apply-on-route.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcp-udp-listeners-apply-on-route.out.yaml @@ -323,12 +323,20 @@ xdsIR: maxPendingRequests: 1 maxRequestsPerConnection: 1 destination: + metadata: + kind: TCPRoute + name: tcp-app-1 + namespace: default name: tcproute/default/tcp-app-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8163 + metadata: + name: service-1 + namespace: default + sectionName: "8163" name: tcproute/default/tcp-app-1/rule/-1/backend/0 protocol: TCP weight: 1 @@ -377,12 +385,20 @@ xdsIR: port: 8162 route: destination: + metadata: + kind: UDPRoute + name: udp-app-1 + namespace: default name: udproute/default/udp-app-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udp-app-1/rule/-1/backend/0 protocol: UDP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcpkeepalive.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcpkeepalive.out.yaml index 7c9c2587eb..c4ba71bf3a 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcpkeepalive.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-tcpkeepalive.out.yaml @@ -267,12 +267,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -314,12 +322,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-error.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-error.out.yaml index fdf30c26ad..f3e2fe090e 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-error.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-error.out.yaml @@ -144,12 +144,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-targetrefs.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-targetrefs.out.yaml index d8a27d8b07..bdc41a4ac9 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-targetrefs.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout-targetrefs.out.yaml @@ -255,12 +255,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: envoy-gateway name: grpcroute/envoy-gateway/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: grpcroute/envoy-gateway/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -304,12 +313,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout.out.yaml b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout.out.yaml index f567963c6a..dbfdd17279 100644 --- a/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout.out.yaml +++ b/internal/gatewayapi/testdata/backendtrafficpolicy-with-timeout.out.yaml @@ -275,12 +275,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -325,12 +333,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-for-tcp-listeners.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-for-tcp-listeners.out.yaml index b597b88dc3..fd461db6cc 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-for-tcp-listeners.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-for-tcp-listeners.out.yaml @@ -201,12 +201,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 @@ -264,12 +272,20 @@ xdsIR: port: 8080 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-http10.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-http10.out.yaml index e6223d109f..12b7687d48 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-http10.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-http10.out.yaml @@ -522,12 +522,21 @@ xdsIR: port: 8082 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -559,12 +568,21 @@ xdsIR: port: 8083 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -582,12 +600,21 @@ xdsIR: name: "" prefix: / - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml index 0ae4c66303..e97251f94a 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-http3.out.yaml @@ -150,12 +150,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/clienttrafficpolicy-invalid-settings.out.yaml b/internal/gatewayapi/testdata/clienttrafficpolicy-invalid-settings.out.yaml index 5e69fda453..13d1b807a7 100644 --- a/internal/gatewayapi/testdata/clienttrafficpolicy-invalid-settings.out.yaml +++ b/internal/gatewayapi/testdata/clienttrafficpolicy-invalid-settings.out.yaml @@ -407,12 +407,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -426,12 +434,20 @@ xdsIR: namespace: default name: httproute/default/httproute-1/rule/0/match/-1/* - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -472,12 +488,20 @@ xdsIR: port: 8080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -510,12 +534,20 @@ xdsIR: port: 5000 routes: - destination: + metadata: + kind: TCPRoute + name: tcp-route-1 + namespace: default name: tcproute/default/tcp-route-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tcproute/default/tcp-route-1/rule/-1/backend/0 protocol: TCP weight: 1 diff --git a/internal/gatewayapi/testdata/conflicting-policies.out.yaml b/internal/gatewayapi/testdata/conflicting-policies.out.yaml index 7c6ab42353..044aa6691c 100644 --- a/internal/gatewayapi/testdata/conflicting-policies.out.yaml +++ b/internal/gatewayapi/testdata/conflicting-policies.out.yaml @@ -282,12 +282,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: bdkzlmibsivuiqav + namespace: default name: httproute/default/bdkzlmibsivuiqav/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/bdkzlmibsivuiqav/rule/0/backend/0 protocol: HTTP weight: 1 @@ -318,12 +326,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: mfqjpuycbgjrtdww + namespace: default name: httproute/default/mfqjpuycbgjrtdww/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/mfqjpuycbgjrtdww/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/custom-filter-order.out.yaml b/internal/gatewayapi/testdata/custom-filter-order.out.yaml index 317ffc3878..74f368ed3f 100644 --- a/internal/gatewayapi/testdata/custom-filter-order.out.yaml +++ b/internal/gatewayapi/testdata/custom-filter-order.out.yaml @@ -242,12 +242,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-override-replace.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-override-replace.out.yaml index c075f0d3a3..671155b84a 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-override-replace.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-override-replace.out.yaml @@ -285,12 +285,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -298,9 +306,18 @@ xdsIR: extProcs: - authority: grpc-backend-2.default:8000 destination: + metadata: + kind: EnvoyExtensionPolicy + name: policy-for-route-1 + namespace: default name: envoyextensionpolicy/default/policy-for-route-1/extproc/0 settings: - - name: envoyextensionpolicy/default/policy-for-route-1/extproc/0/backend/0 + - metadata: + kind: Service + name: grpc-backend-2 + namespace: default + sectionName: "8000" + name: envoyextensionpolicy/default/policy-for-route-1/extproc/0/backend/0 protocol: GRPC weight: 1 name: envoyextensionpolicy/default/policy-for-route-1/extproc/0 @@ -316,12 +333,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -329,9 +354,18 @@ xdsIR: extProcs: - authority: grpc-backend.envoy-gateway:9000 destination: + metadata: + kind: EnvoyExtensionPolicy + name: policy-for-gateway-1 + namespace: envoy-gateway name: envoyextensionpolicy/envoy-gateway/policy-for-gateway-1/extproc/0 settings: - - name: envoyextensionpolicy/envoy-gateway/policy-for-gateway-1/extproc/0/backend/0 + - metadata: + kind: Service + name: grpc-backend + namespace: envoy-gateway + sectionName: "9000" + name: envoyextensionpolicy/envoy-gateway/policy-for-gateway-1/extproc/0/backend/0 protocol: GRPC weight: 1 name: envoyextensionpolicy/envoy-gateway/policy-for-gateway-1/extproc/0 @@ -347,12 +381,20 @@ xdsIR: name: "" prefix: /bar - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-status-conditions.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-status-conditions.out.yaml index eaf37b6219..4eecf91b99 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-status-conditions.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-status-conditions.out.yaml @@ -564,12 +564,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -611,12 +620,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: envoy-gateway name: grpcroute/envoy-gateway/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: grpcroute/envoy-gateway/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-matching-port.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-matching-port.out.yaml index 1176a7a1c5..4cc4861bda 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-matching-port.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-matching-port.out.yaml @@ -147,12 +147,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-port.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-port.out.yaml index 83b9189c78..d8d101a395 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-port.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-port.out.yaml @@ -147,12 +147,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-reference-grant.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-reference-grant.out.yaml index 4caeefaa7b..5aadd92998 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-reference-grant.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-reference-grant.out.yaml @@ -149,12 +149,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-service.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-service.out.yaml index 37303c3bcd..080115d0b5 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-service.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-invalid-no-service.out.yaml @@ -148,12 +148,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-backendtlspolicy.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-backendtlspolicy.out.yaml index a5523f6cde..c52c284431 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-backendtlspolicy.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-backendtlspolicy.out.yaml @@ -308,12 +308,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -321,12 +329,21 @@ xdsIR: extProcs: - authority: grpc-backend-2.default:9000 destination: + metadata: + kind: EnvoyExtensionPolicy + name: policy-for-http-route + namespace: default name: envoyextensionpolicy/default/policy-for-http-route/extproc/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 9000 + metadata: + kind: Service + name: grpc-backend-2 + namespace: default + sectionName: "9000" name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/0 protocol: GRPC tls: @@ -351,12 +368,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -365,9 +390,18 @@ xdsIR: - allowModeOverride: true authority: grpc-backend.envoy-gateway:8000 destination: + metadata: + kind: EnvoyExtensionPolicy + name: policy-for-gateway + namespace: default name: envoyextensionpolicy/default/policy-for-gateway/extproc/0 settings: - addressType: IP + metadata: + kind: Service + name: grpc-backend + namespace: envoy-gateway + sectionName: "8000" name: envoyextensionpolicy/default/policy-for-gateway/extproc/0/backend/0 protocol: GRPC tls: diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-mixed-backendrefs.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-mixed-backendrefs.out.yaml index 4651ffd492..2f61e6146a 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-mixed-backendrefs.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-mixed-backendrefs.out.yaml @@ -191,12 +191,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-multiple-backendrefs.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-multiple-backendrefs.out.yaml index 99f04c1c5d..51a65359bd 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-multiple-backendrefs.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-multiple-backendrefs.out.yaml @@ -297,12 +297,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -310,9 +318,18 @@ xdsIR: extProcs: - authority: grpc-backend.envoy-gateway:8000 destination: + metadata: + kind: EnvoyExtensionPolicy + name: policy-for-http-route + namespace: default name: envoyextensionpolicy/default/policy-for-http-route/extproc/0 settings: - addressType: IP + metadata: + kind: Service + name: grpc-backend + namespace: envoy-gateway + sectionName: "8000" name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/0 protocol: GRPC tls: @@ -326,6 +343,11 @@ xdsIR: endpoints: - host: 8.8.8.8 port: 9000 + metadata: + kind: Service + name: grpc-backend-2 + namespace: default + sectionName: "9000" name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/1 protocol: GRPC weight: 1 @@ -333,6 +355,10 @@ xdsIR: endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/2 protocol: GRPC weight: 1 @@ -340,6 +366,10 @@ xdsIR: endpoints: - host: 2.2.2.2 port: 3443 + metadata: + kind: Backend + name: backend-ip-tls + namespace: envoy-gateway name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/3 protocol: GRPC tls: @@ -362,12 +392,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-traffic-features.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-traffic-features.out.yaml index b224076141..3500b3aa15 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-traffic-features.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-extproc-with-traffic-features.out.yaml @@ -326,12 +326,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -339,9 +347,18 @@ xdsIR: extProcs: - authority: grpc-backend.envoy-gateway:8000 destination: + metadata: + kind: EnvoyExtensionPolicy + name: policy-for-http-route + namespace: default name: envoyextensionpolicy/default/policy-for-http-route/extproc/0 settings: - addressType: IP + metadata: + kind: Service + name: grpc-backend + namespace: envoy-gateway + sectionName: "8000" name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/0 protocol: GRPC tls: @@ -355,6 +372,11 @@ xdsIR: endpoints: - host: 8.8.8.8 port: 9000 + metadata: + kind: Service + name: grpc-backend-2 + namespace: default + sectionName: "9000" name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/1 protocol: GRPC weight: 1 @@ -362,6 +384,10 @@ xdsIR: endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/2 protocol: GRPC weight: 1 @@ -369,6 +395,10 @@ xdsIR: endpoints: - host: 2.2.2.2 port: 3443 + metadata: + kind: Backend + name: backend-ip-tls + namespace: envoy-gateway name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/3 protocol: GRPC tls: @@ -418,12 +448,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-invalid-lua.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-invalid-lua.out.yaml index 805fc9f8e3..60a250d0f6 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-invalid-lua.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-invalid-lua.out.yaml @@ -224,12 +224,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -252,12 +260,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-lua-configmap.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-lua-configmap.out.yaml index 69c4a14dd6..edd3d74806 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-lua-configmap.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-lua-configmap.out.yaml @@ -405,12 +405,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -435,12 +443,20 @@ xdsIR: name: "" prefix: /bar3 - destination: + metadata: + kind: HTTPRoute + name: httproute-4 + namespace: default name: httproute/default/httproute-4/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-4/rule/0/backend/0 protocol: HTTP weight: 1 @@ -465,12 +481,20 @@ xdsIR: name: "" prefix: /bar4 - destination: + metadata: + kind: HTTPRoute + name: httproute-5 + namespace: default name: httproute/default/httproute-5/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-5/rule/0/backend/0 protocol: HTTP weight: 1 @@ -495,12 +519,20 @@ xdsIR: name: "" prefix: /bar5 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -523,12 +555,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-lua.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-lua.out.yaml index 02076b8159..c6ea37218c 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-lua.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-lua.out.yaml @@ -221,12 +221,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -247,12 +255,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm-env-vars.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm-env-vars.out.yaml index ad85a49a8b..5b8e5e9cd5 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm-env-vars.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm-env-vars.out.yaml @@ -256,12 +256,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -290,12 +298,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm-targetrefs.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm-targetrefs.out.yaml index 2edda493c9..3a4d9ace19 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm-targetrefs.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm-targetrefs.out.yaml @@ -224,12 +224,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -269,12 +278,21 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm.out.yaml b/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm.out.yaml index d893d5cb33..a24f788861 100644 --- a/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm.out.yaml +++ b/internal/gatewayapi/testdata/envoyextensionpolicy-with-wasm.out.yaml @@ -258,12 +258,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -294,12 +302,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-als-json.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-als-json.out.yaml index 0d9ed00928..af490aee54 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-als-json.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-als-json.out.yaml @@ -153,12 +153,21 @@ xdsIR: attr1: val1 attr2: val2 destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_0_0 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_0_0/backend/-1 protocol: GRPC http: @@ -174,12 +183,21 @@ xdsIR: attr1: val1 attr2: val2 destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_0_1 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_0_1/backend/-1 protocol: GRPC name: envoy-gateway-system/test diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-backend.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-backend.out.yaml index 126b0e1f3d..adb656a045 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-backend.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-backend.out.yaml @@ -138,12 +138,20 @@ xdsIR: accessLog: openTelemetry: - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_otel_0_1 settings: - addressType: IP endpoints: - host: 8.7.6.5 port: 4317 + metadata: + name: otel-collector + namespace: monitoring + sectionName: "4317" name: accesslog_otel_0_1/backend/-1 protocol: GRPC resources: diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-cel.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-cel.out.yaml index 5860d22d37..68f4e00807 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-cel.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-cel.out.yaml @@ -146,12 +146,21 @@ xdsIR: accessLog: als: - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_1_0 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_1_0/backend/-1 protocol: GRPC name: envoy-gateway-system/test @@ -161,6 +170,10 @@ xdsIR: celMatches: - response.code >= 400 destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_otel_0_1 settings: - endpoints: diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-types.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-types.out.yaml index ee39fdc588..c4f0d0cba8 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-types.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-types.out.yaml @@ -272,12 +272,21 @@ xdsIR: accessLog: als: - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_2_1 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_2_1/backend/-1 protocol: GRPC http: @@ -293,12 +302,21 @@ xdsIR: this is a route log type: HTTP - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_2_2 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_2_2/backend/-1 protocol: GRPC logType: Route @@ -307,12 +325,21 @@ xdsIR: this is a route log type: TCP - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_3_1 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_3_1/backend/-1 protocol: GRPC http: @@ -328,12 +355,21 @@ xdsIR: this is a listener log type: HTTP - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_3_2 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_3_2/backend/-1 protocol: GRPC logType: Listener @@ -342,12 +378,21 @@ xdsIR: this is a listener log type: TCP - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_4_1 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_4_1/backend/-1 protocol: GRPC http: @@ -362,12 +407,21 @@ xdsIR: this is a Global log type: HTTP - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_4_2 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_4_2/backend/-1 protocol: GRPC name: envoy-gateway-system/test @@ -382,6 +436,10 @@ xdsIR: openTelemetry: - authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_otel_2_3 settings: - endpoints: @@ -397,6 +455,10 @@ xdsIR: this is a route log - authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_otel_3_3 settings: - endpoints: @@ -412,6 +474,10 @@ xdsIR: this is a listener log - authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_otel_4_3 settings: - endpoints: @@ -453,12 +519,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-with-traffic.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-with-traffic.out.yaml index 6a4fc3fe26..6842e6848f 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-with-traffic.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-with-traffic.out.yaml @@ -212,12 +212,21 @@ xdsIR: accessLog: als: - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_0_1 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_0_1/backend/-1 protocol: GRPC http: @@ -257,12 +266,21 @@ xdsIR: connectTimeout: 15s type: HTTP - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_0_2 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_0_2/backend/-1 protocol: GRPC name: envoy-gateway-system/test @@ -272,6 +290,10 @@ xdsIR: openTelemetry: - authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_otel_0_3 settings: - endpoints: diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-without-format.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-without-format.out.yaml index eb2f5e64ec..c91e37be39 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-without-format.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-without-format.out.yaml @@ -154,12 +154,21 @@ xdsIR: accessLog: als: - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_0_1 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_0_1/backend/-1 protocol: GRPC http: @@ -172,12 +181,21 @@ xdsIR: name: accesslog type: HTTP - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_0_2 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_0_2/backend/-1 protocol: GRPC name: envoy-gateway-system/test @@ -185,6 +203,10 @@ xdsIR: openTelemetry: - authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_otel_0_3 settings: - endpoints: diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml index e249d572af..9ae9a6d47b 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog.out.yaml @@ -158,12 +158,21 @@ xdsIR: accessLog: als: - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_0_1 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_0_1/backend/-1 protocol: GRPC http: @@ -178,12 +187,21 @@ xdsIR: [%START_TIME%] "%REQ(:METHOD)% %PROTOCOL%" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% "%REQ(X-FORWARDED-FOR)%" "%REQ(USER-AGENT)%" "%REQ(X-REQUEST-ID)%" "%REQ(:AUTHORITY)%" "%UPSTREAM_HOST%"\n type: HTTP - destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_als_0_2 settings: - addressType: IP endpoints: - host: 10.240.0.10 port: 9090 + metadata: + kind: Service + name: envoy-als + namespace: monitoring + sectionName: "9000" name: accesslog_als_0_2/backend/-1 protocol: GRPC name: envoy-gateway-system/test @@ -193,6 +211,10 @@ xdsIR: openTelemetry: - authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: accesslog_otel_0_3 settings: - endpoints: diff --git a/internal/gatewayapi/testdata/envoyproxy-endpoint-routing-for-gateway.out.yaml b/internal/gatewayapi/testdata/envoyproxy-endpoint-routing-for-gateway.out.yaml index 8836ea1ddd..ea836ff0b6 100644 --- a/internal/gatewayapi/testdata/envoyproxy-endpoint-routing-for-gateway.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-endpoint-routing-for-gateway.out.yaml @@ -129,12 +129,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyproxy-endpoint-routing.out.yaml b/internal/gatewayapi/testdata/envoyproxy-endpoint-routing.out.yaml index 4c9b2535e1..6c1e69cc2c 100644 --- a/internal/gatewayapi/testdata/envoyproxy-endpoint-routing.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-endpoint-routing.out.yaml @@ -124,12 +124,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyproxy-preserve-route-order.out.yaml b/internal/gatewayapi/testdata/envoyproxy-preserve-route-order.out.yaml index b3e2dc8fc2..9f7e4f4e64 100644 --- a/internal/gatewayapi/testdata/envoyproxy-preserve-route-order.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-preserve-route-order.out.yaml @@ -175,12 +175,20 @@ xdsIR: preserveRouteOrder: true routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -196,12 +204,20 @@ xdsIR: name: "" prefix: / - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 @@ -217,12 +233,20 @@ xdsIR: name: "" safeRegex: /regex/between/prefixes/* - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/2 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/2/backend/0 protocol: HTTP weight: 1 @@ -238,12 +262,20 @@ xdsIR: name: "" prefix: /specific/prefix/after/less/specific - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/3 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/3/backend/0 protocol: HTTP weight: 1 @@ -259,12 +291,20 @@ xdsIR: exact: /exact name: "" - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/4 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/4/backend/0 protocol: HTTP weight: 1 @@ -280,12 +320,20 @@ xdsIR: name: "" safeRegex: /regex/between/exacts/* - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/5 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/5/backend/0 protocol: HTTP weight: 1 @@ -301,12 +349,20 @@ xdsIR: exact: /specific/exact/after/less/specific name: "" - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/6 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/6/backend/0 protocol: HTTP weight: 1 @@ -322,12 +378,20 @@ xdsIR: name: "" safeRegex: /short/regex/* - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/7 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/7/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyproxy-priority-backend.out.yaml b/internal/gatewayapi/testdata/envoyproxy-priority-backend.out.yaml index eec00bdc4c..2c2e0df086 100644 --- a/internal/gatewayapi/testdata/envoyproxy-priority-backend.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-priority-backend.out.yaml @@ -300,12 +300,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -313,9 +321,18 @@ xdsIR: extProcs: - authority: grpc-backend.envoy-gateway:8000 destination: + metadata: + kind: EnvoyExtensionPolicy + name: policy-for-http-route + namespace: default name: envoyextensionpolicy/default/policy-for-http-route/extproc/0 settings: - addressType: IP + metadata: + kind: Service + name: grpc-backend + namespace: envoy-gateway + sectionName: "8000" name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/0 protocol: GRPC tls: @@ -329,6 +346,11 @@ xdsIR: endpoints: - host: 8.8.8.8 port: 9000 + metadata: + kind: Service + name: grpc-backend-2 + namespace: default + sectionName: "9000" name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/1 priority: 1 protocol: GRPC @@ -337,6 +359,10 @@ xdsIR: endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/2 priority: 1 protocol: GRPC @@ -345,6 +371,10 @@ xdsIR: endpoints: - host: 2.2.2.2 port: 3443 + metadata: + kind: Backend + name: backend-ip-tls + namespace: envoy-gateway name: envoyextensionpolicy/default/policy-for-http-route/extproc/0/backend/3 priority: 1 protocol: GRPC @@ -368,12 +398,20 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyproxy-service-routing-for-gateway.out.yaml b/internal/gatewayapi/testdata/envoyproxy-service-routing-for-gateway.out.yaml index ddde785b6d..4db5670570 100644 --- a/internal/gatewayapi/testdata/envoyproxy-service-routing-for-gateway.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-service-routing-for-gateway.out.yaml @@ -129,11 +129,19 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - endpoints: - host: 1.1.1.1 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyproxy-service-routing.out.yaml b/internal/gatewayapi/testdata/envoyproxy-service-routing.out.yaml index dd16b8bfe3..a3ae99eb3b 100644 --- a/internal/gatewayapi/testdata/envoyproxy-service-routing.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-service-routing.out.yaml @@ -124,11 +124,19 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - endpoints: - host: 1.1.1.1 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/envoyproxy-tls-settings-invalid-ns.out.yaml b/internal/gatewayapi/testdata/envoyproxy-tls-settings-invalid-ns.out.yaml index 98a08206af..956fda32d3 100644 --- a/internal/gatewayapi/testdata/envoyproxy-tls-settings-invalid-ns.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-tls-settings-invalid-ns.out.yaml @@ -271,6 +271,10 @@ xdsIR: port: 10445 routes: - destination: + metadata: + kind: TCPRoute + name: envoy-gateway + namespace: envoy-gateway name: tcproute/envoy-gateway/envoy-gateway/rule/-1 name: tcproute/envoy-gateway/envoy-gateway tls: diff --git a/internal/gatewayapi/testdata/envoyproxy-tls-settings-invalid.out.yaml b/internal/gatewayapi/testdata/envoyproxy-tls-settings-invalid.out.yaml index 775ff25869..fa54d669cc 100644 --- a/internal/gatewayapi/testdata/envoyproxy-tls-settings-invalid.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-tls-settings-invalid.out.yaml @@ -270,6 +270,10 @@ xdsIR: port: 10445 routes: - destination: + metadata: + kind: TCPRoute + name: envoy-gateway + namespace: envoy-gateway name: tcproute/envoy-gateway/envoy-gateway/rule/-1 name: tcproute/envoy-gateway/envoy-gateway tls: diff --git a/internal/gatewayapi/testdata/envoyproxy-tls-settings.out.yaml b/internal/gatewayapi/testdata/envoyproxy-tls-settings.out.yaml index b36e770ce0..a1d2a2bbd2 100644 --- a/internal/gatewayapi/testdata/envoyproxy-tls-settings.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-tls-settings.out.yaml @@ -242,12 +242,21 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-tls + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-tls/rule/0 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 443 + metadata: + kind: Service + name: https-backend + namespace: default + sectionName: "443" name: httproute/envoy-gateway/httproute-tls/rule/0/backend/0 protocol: HTTP tls: @@ -298,12 +307,21 @@ xdsIR: port: 10445 routes: - destination: + metadata: + kind: TCPRoute + name: envoy-gateway + namespace: envoy-gateway name: tcproute/envoy-gateway/envoy-gateway/rule/-1 settings: - addressType: IP endpoints: - host: 10.244.0.11 port: 443 + metadata: + kind: Service + name: https-backend + namespace: default + sectionName: "443" name: tcproute/envoy-gateway/envoy-gateway/rule/-1/backend/0 protocol: TCP tls: diff --git a/internal/gatewayapi/testdata/envoyproxy-tracing-backend.out.yaml b/internal/gatewayapi/testdata/envoyproxy-tracing-backend.out.yaml index c0873c5219..7ffbe5290d 100644 --- a/internal/gatewayapi/testdata/envoyproxy-tracing-backend.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-tracing-backend.out.yaml @@ -177,12 +177,20 @@ xdsIR: port: 19003 tracing: destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway-system name: tracing settings: - addressType: IP endpoints: - host: 8.7.6.5 port: 4317 + metadata: + name: otel-collector + namespace: monitoring + sectionName: "4317" name: tracing/backend/-1 protocol: GRPC provider: 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 bbb5dc912d..dd23c6fc37 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 @@ -124,12 +124,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 b73400dfd7..33e797499f 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 @@ -113,12 +113,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/gateway-http-listener-with-hostname-intersection.out.yaml b/internal/gatewayapi/testdata/gateway-http-listener-with-hostname-intersection.out.yaml index b1cb1d239a..14a2de6dbc 100644 --- a/internal/gatewayapi/testdata/gateway-http-listener-with-hostname-intersection.out.yaml +++ b/internal/gatewayapi/testdata/gateway-http-listener-with-hostname-intersection.out.yaml @@ -189,12 +189,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -225,12 +234,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml b/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml index a5e8083413..8867c0ddd8 100644 --- a/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml +++ b/internal/gatewayapi/testdata/gateway-infrastructure.out.yaml @@ -131,12 +131,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/gateway-namespace-mode-infra-httproute.out.yaml b/internal/gatewayapi/testdata/gateway-namespace-mode-infra-httproute.out.yaml index 8d453faf57..bce08a6385 100644 --- a/internal/gatewayapi/testdata/gateway-namespace-mode-infra-httproute.out.yaml +++ b/internal/gatewayapi/testdata/gateway-namespace-mode-infra-httproute.out.yaml @@ -296,12 +296,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -342,12 +350,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/gateway-with-infrastructure-parametersref.out.yaml b/internal/gatewayapi/testdata/gateway-with-infrastructure-parametersref.out.yaml index 7baf8b12da..9ed1f70a21 100644 --- a/internal/gatewayapi/testdata/gateway-with-infrastructure-parametersref.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-infrastructure-parametersref.out.yaml @@ -140,12 +140,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -168,6 +176,10 @@ xdsIR: tracing: authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway name: tracing settings: - endpoints: diff --git a/internal/gatewayapi/testdata/gateway-with-invalid-infrastructure-parametersref-does-not-exist.out.yaml b/internal/gatewayapi/testdata/gateway-with-invalid-infrastructure-parametersref-does-not-exist.out.yaml index b8761dcc50..8a97609951 100644 --- a/internal/gatewayapi/testdata/gateway-with-invalid-infrastructure-parametersref-does-not-exist.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-invalid-infrastructure-parametersref-does-not-exist.out.yaml @@ -123,12 +123,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/gateway-with-invalid-infrastructure-parametersref-fallback.out.yaml b/internal/gatewayapi/testdata/gateway-with-invalid-infrastructure-parametersref-fallback.out.yaml index 65d151a0d4..77fc2e82d8 100644 --- a/internal/gatewayapi/testdata/gateway-with-invalid-infrastructure-parametersref-fallback.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-invalid-infrastructure-parametersref-fallback.out.yaml @@ -140,12 +140,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -168,6 +176,10 @@ xdsIR: tracing: authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway name: tracing settings: - endpoints: diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.out.yaml index 3330e20c84..997d206101 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-mismatch-port-protocol.out.yaml @@ -102,5 +102,9 @@ xdsIR: port: 10162 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 name: tcproute/default/tcproute-1 diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.out.yaml index 34c400d877..8f33aa5dd7 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-tcproute-with-multiple-backends.out.yaml @@ -106,12 +106,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 50 @@ -119,6 +127,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: tcproute/default/tcproute-1/rule/-1/backend/1 protocol: TCP weight: 50 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 798f183396..c4c88292fc 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 @@ -120,12 +120,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 04cb216f66..f46c75de5d 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 @@ -189,12 +189,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -226,12 +234,20 @@ xdsIR: port: 10090 routes: - destination: + metadata: + kind: TLSRoute + name: tlsroute-1 + namespace: default name: tlsroute/default/tlsroute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: tlsroute/default/tlsroute-1/rule/-1/backend/0 protocol: HTTPS weight: 1 diff --git a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.out.yaml b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.out.yaml index cab695aa8c..ece8b6875e 100644 --- a/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-listener-with-udproute-with-multiple-backends.out.yaml @@ -106,12 +106,20 @@ xdsIR: port: 10080 route: destination: + metadata: + kind: UDPRoute + name: udproute-1 + namespace: default name: udproute/default/udproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/0 protocol: UDP weight: 50 @@ -119,6 +127,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-2 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/1 protocol: UDP weight: 50 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 d1900d9137..da74ba3d95 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 @@ -122,12 +122,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 ff1720bdce..3bfc025bad 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 @@ -122,12 +122,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 6ef623cd42..ef95706331 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 @@ -119,12 +119,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-certs.out.yaml b/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-certs.out.yaml index 0b7bdfa2e4..ecb0743336 100644 --- a/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-certs.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-certs.out.yaml @@ -206,12 +206,21 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -249,12 +258,21 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -292,12 +310,21 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-hostnames-and-certs.out.yaml b/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-hostnames-and-certs.out.yaml index d95a9413a8..3086d59c0c 100644 --- a/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-hostnames-and-certs.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-hostnames-and-certs.out.yaml @@ -170,12 +170,21 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -213,12 +222,21 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-hostnames.out.yaml b/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-hostnames.out.yaml index 4f60b08c32..12ee94410b 100644 --- a/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-hostnames.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-multiple-https-listeners-with-overlapping-hostnames.out.yaml @@ -206,12 +206,21 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -249,12 +258,21 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -292,12 +310,21 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 919cc00bc9..81f4296046 100644 --- a/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-preexisting-status-condition.out.yaml @@ -113,12 +113,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 ec840b87bd..9031890f8b 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 @@ -133,12 +133,20 @@ xdsIR: port: 10162 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8163 + metadata: + name: service-1 + namespace: default + sectionName: "8163" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 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 7b724e53f0..85e2c33bc9 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 @@ -133,12 +133,20 @@ xdsIR: port: 10162 route: destination: + metadata: + kind: UDPRoute + name: udproute-1 + namespace: default name: udproute/default/udproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/0 protocol: UDP weight: 1 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 0b97aab210..682d54907f 100644 --- a/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml +++ b/internal/gatewayapi/testdata/gateway-with-stale-status-condition.out.yaml @@ -119,12 +119,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 0611d2d3af..ed3a247e86 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,12 +126,20 @@ xdsIR: port: 10162 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8163 + metadata: + name: service-1 + namespace: default + sectionName: "8163" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 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 0d46f5303b..30ee22369c 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 @@ -129,12 +129,20 @@ xdsIR: port: 10162 route: destination: + metadata: + kind: UDPRoute + name: udproute-1 + namespace: default name: udproute/default/udproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/0 protocol: UDP weight: 1 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 659f69dcd0..6c7f49c1b3 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 @@ -185,12 +185,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -206,12 +214,20 @@ xdsIR: name: "" prefix: /test - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -242,12 +258,20 @@ xdsIR: port: 10081 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -263,12 +287,20 @@ xdsIR: name: "" prefix: /test - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 d7df9bc6b3..a60da6b474 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 @@ -180,12 +180,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -211,12 +219,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8163 + metadata: + name: service-1 + namespace: default + sectionName: "8163" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 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 a1ad394249..078814cdb9 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 @@ -180,12 +180,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -211,12 +219,20 @@ xdsIR: port: 10080 route: destination: + metadata: + kind: UDPRoute + name: udproute-1 + namespace: default name: udproute/default/udproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/0 protocol: UDP weight: 1 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 2653019239..80fed5409e 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 @@ -171,12 +171,20 @@ xdsIR: port: 10162 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8163 + metadata: + name: service-1 + namespace: default + sectionName: "8163" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 @@ -186,12 +194,20 @@ xdsIR: port: 10163 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-2 + namespace: default name: tcproute/default/tcproute-2/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8163 + metadata: + name: service-2 + namespace: default + sectionName: "8163" name: tcproute/default/tcproute-2/rule/-1/backend/0 protocol: TCP weight: 1 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 5ddb004b1f..b8e7e6ad65 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 @@ -167,12 +167,20 @@ xdsIR: port: 10161 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8163 + metadata: + name: service-1 + namespace: default + sectionName: "8163" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 @@ -182,12 +190,20 @@ xdsIR: port: 10162 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8163 + metadata: + name: service-1 + namespace: default + sectionName: "8163" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 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 643b2d8a10..309b551a1b 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 @@ -171,12 +171,20 @@ xdsIR: port: 10162 route: destination: + metadata: + kind: UDPRoute + name: udproute-1 + namespace: default name: udproute/default/udproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/0 protocol: UDP weight: 1 @@ -186,12 +194,20 @@ xdsIR: port: 10163 route: destination: + metadata: + kind: UDPRoute + name: udproute-2 + namespace: default name: udproute/default/udproute-2/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-2 + namespace: default + sectionName: "8162" name: udproute/default/udproute-2/rule/-1/backend/0 protocol: UDP weight: 1 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 28db6146fd..162d3b3e9c 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 @@ -167,12 +167,20 @@ xdsIR: port: 10161 route: destination: + metadata: + kind: UDPRoute + name: udproute-1 + namespace: default name: udproute/default/udproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/0 protocol: UDP weight: 1 @@ -182,12 +190,20 @@ xdsIR: port: 10162 route: destination: + metadata: + kind: UDPRoute + name: udproute-1 + namespace: default name: udproute/default/udproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/0 protocol: UDP weight: 1 diff --git a/internal/gatewayapi/testdata/grpcroute-with-backend.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-backend.out.yaml index a789d8adc4..3120ca2f91 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-backend.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-backend.out.yaml @@ -140,12 +140,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default + sectionName: grpcrule-1 name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -162,12 +171,21 @@ xdsIR: name: "" safeRegex: /com.[A-Z]+/[A-Za-z_][A-Za-z_0-9]* - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default + sectionName: grpcrule-1 name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 diff --git a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml index d57fcd4718..2ad3e137a8 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-header-match.out.yaml @@ -117,12 +117,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 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 3259d42b03..8bba8d7af6 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 @@ -121,12 +121,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -142,12 +150,20 @@ xdsIR: exact: /com.example/Example name: "" - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 diff --git a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml index 9728222660..1c1455d9cc 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-method-match.out.yaml @@ -119,12 +119,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -140,12 +148,20 @@ xdsIR: name: "" safeRegex: /(?i)\.?[a-z_][a-z_0-9]*(\.[a-z_][a-z_0-9]*)*/FooBar[0-9]+ - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 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 638a164240..7b5741b10e 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-request-header-modifier.out.yaml @@ -133,12 +133,20 @@ xdsIR: value: - foo destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 diff --git a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml index c6b0f3779f..746479521f 100644 --- a/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml +++ b/internal/gatewayapi/testdata/grpcroute-with-service-match.out.yaml @@ -119,12 +119,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -140,12 +148,20 @@ xdsIR: name: "" safeRegex: /com.[A-Z]+/[A-Za-z_][A-Za-z_0-9]* - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout-error.out.yaml b/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout-error.out.yaml index 05fbd7e5f1..2d932a7696 100644 --- a/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout-error.out.yaml +++ b/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout-error.out.yaml @@ -151,12 +151,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout.out.yaml index 3b14a31d9f..a82d1ad0fb 100644 --- a/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-and-backendtrafficpolicy-with-timeout.out.yaml @@ -272,12 +272,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -321,12 +329,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 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 8d7cab5ab8..a9d35fc99b 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 @@ -373,12 +373,20 @@ xdsIR: port: 10081 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -409,12 +417,20 @@ xdsIR: port: 10082 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -445,12 +461,20 @@ xdsIR: port: 10083 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -481,12 +505,20 @@ xdsIR: port: 10084 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -517,12 +549,20 @@ xdsIR: port: 10085 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -553,12 +593,20 @@ xdsIR: port: 10086 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -589,12 +637,20 @@ xdsIR: port: 10087 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -625,12 +681,20 @@ xdsIR: port: 10088 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 5e99289639..40083a9ede 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 @@ -324,12 +324,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -360,12 +368,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -396,12 +412,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -432,12 +456,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -468,12 +500,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -504,12 +544,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -540,12 +588,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -576,12 +632,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 71b0049dd1..bf5b4df666 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 @@ -155,12 +155,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -191,12 +199,20 @@ xdsIR: port: 10443 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 486b50e454..41bb6fc860 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 @@ -144,12 +144,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -180,12 +188,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml index dc033566db..8ea37d0de7 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-gateway.out.yaml @@ -113,12 +113,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 75d24e4814..260a04187b 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 @@ -117,12 +117,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 dc4782837f..08b84b97c6 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 @@ -160,12 +160,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-backend-and-core-backendrefs.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-backend-and-core-backendrefs.out.yaml index 8606738c08..3a85fba33e 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-backend-and-core-backendrefs.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-backend-and-core-backendrefs.out.yaml @@ -219,12 +219,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-static + namespace: default name: httproute/default/httproute-static/rule/0 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: httproute/default/httproute-static/rule/0/backend/0 protocol: HTTP weight: 1 @@ -232,6 +240,11 @@ xdsIR: endpoints: - host: 4.3.2.1 port: 8080 + metadata: + kind: Service + name: service-ip + namespace: default + sectionName: "8080" name: httproute/default/httproute-static/rule/0/backend/1 protocol: HTTP weight: 1 @@ -239,6 +252,11 @@ xdsIR: endpoints: - host: 1.2.3.4 port: 8081 + metadata: + kind: ServiceImport + name: service-import-ip + namespace: default + sectionName: "8081" name: httproute/default/httproute-static/rule/0/backend/2 protocol: HTTP weight: 1 @@ -254,12 +272,20 @@ xdsIR: name: "" prefix: /1 - destination: + metadata: + kind: HTTPRoute + name: httproute-fqdn + namespace: default name: httproute/default/httproute-fqdn/rule/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: httproute/default/httproute-fqdn/rule/0/backend/0 protocol: HTTP weight: 1 @@ -267,6 +293,11 @@ xdsIR: endpoints: - host: bar.foo port: 8080 + metadata: + kind: Service + name: service-fqdn + namespace: default + sectionName: "8080" name: httproute/default/httproute-fqdn/rule/0/backend/1 protocol: HTTP weight: 1 @@ -274,6 +305,11 @@ xdsIR: endpoints: - host: foo.bar port: 8080 + metadata: + kind: ServiceImport + name: service-import-fqdn + namespace: default + sectionName: "8081" name: httproute/default/httproute-fqdn/rule/0/backend/2 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-backend-backendref.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-backend-backendref.out.yaml index ddd22f2702..fd89eb0800 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-backend-backendref.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-backend-backendref.out.yaml @@ -372,12 +372,20 @@ xdsIR: name: "" prefix: /1 - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -393,12 +401,20 @@ xdsIR: name: "" prefix: /3 - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-backend-backendrefs-diff-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-backend-backendrefs-diff-address-type.out.yaml index ab706c94c7..3764b8b690 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-backend-backendrefs-diff-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-backend-backendrefs-diff-address-type.out.yaml @@ -325,12 +325,20 @@ xdsIR: name: "" prefix: /2 - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -338,6 +346,10 @@ xdsIR: endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: httproute/default/httproute-3/rule/0/backend/1 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-backend-backendrefs-same-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-backend-backendrefs-same-address-type.out.yaml index b9a5594c28..38acb8fb4d 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-backend-backendrefs-same-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-backend-backendrefs-same-address-type.out.yaml @@ -321,12 +321,20 @@ xdsIR: name: "" prefix: /1 - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -334,6 +342,10 @@ xdsIR: endpoints: - host: 2.2.2.2 port: 3001 + metadata: + kind: Backend + name: backend-ip2 + namespace: default name: httproute/default/httproute-2/rule/0/backend/1 protocol: HTTP weight: 1 @@ -349,12 +361,20 @@ xdsIR: name: "" prefix: /2 - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -362,6 +382,10 @@ xdsIR: endpoints: - host: primary2.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn2 + namespace: default name: httproute/default/httproute-3/rule/0/backend/1 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml index ac4bacf904..d57c147387 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-diff-address-type.out.yaml @@ -121,12 +121,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: FQDN endpoints: - host: foo.bar port: 8080 + metadata: + kind: ServiceImport + name: service-import-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -134,6 +143,11 @@ xdsIR: endpoints: - host: 1.2.3.4 port: 8081 + metadata: + kind: ServiceImport + name: service-import-2 + namespace: default + sectionName: "8081" name: httproute/default/httproute-1/rule/0/backend/1 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml index 2775813b13..9ac8daa4d8 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-multiple-serviceimport-backendrefs-same-address-type.out.yaml @@ -121,12 +121,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: FQDN endpoints: - host: foo.bar port: 8080 + metadata: + kind: ServiceImport + name: service-import-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -134,6 +143,11 @@ xdsIR: endpoints: - host: bar.foo port: 8081 + metadata: + kind: ServiceImport + name: service-import-2 + namespace: default + sectionName: "8081" name: httproute/default/httproute-1/rule/0/backend/1 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml index d91690952f..bdd92b2226 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener-with-serviceimport-backendref-fqdn-address-type.out.yaml @@ -117,12 +117,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: FQDN endpoints: - host: foo.bar port: 8080 + metadata: + kind: ServiceImport + name: service-import-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 2108557502..3f2b7c201e 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 @@ -117,12 +117,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 8080 + metadata: + kind: ServiceImport + name: service-import-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml index d9481a7dc2..3708df0728 100644 --- a/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml +++ b/internal/gatewayapi/testdata/httproute-attaching-to-listener.out.yaml @@ -115,12 +115,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml index 34a0e69a1d..ef07eb3def 100644 --- a/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-backend-request-timeout.out.yaml @@ -117,12 +117,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-dynamic-resolver.out.yaml b/internal/gatewayapi/testdata/httproute-dynamic-resolver.out.yaml index 8164485596..c2f9b43301 100644 --- a/internal/gatewayapi/testdata/httproute-dynamic-resolver.out.yaml +++ b/internal/gatewayapi/testdata/httproute-dynamic-resolver.out.yaml @@ -189,6 +189,10 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - isDynamicResolver: true @@ -207,6 +211,10 @@ xdsIR: namespace: default name: httproute/default/httproute-1/rule/0/match/-1/gateway_envoyproxy_io - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - isDynamicResolver: true diff --git a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml index 8e49ab3764..042d8ceb17 100644 --- a/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml +++ b/internal/gatewayapi/testdata/httproute-request-timeout.out.yaml @@ -117,12 +117,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-retry.out.yaml b/internal/gatewayapi/testdata/httproute-retry.out.yaml index 2d9e06df3a..c7c2492c4c 100644 --- a/internal/gatewayapi/testdata/httproute-retry.out.yaml +++ b/internal/gatewayapi/testdata/httproute-retry.out.yaml @@ -279,12 +279,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 b3c3ee93d2..990a7da5d5 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 @@ -117,12 +117,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -130,6 +138,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/1 protocol: HTTP weight: 1 @@ -137,6 +149,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/2 protocol: HTTP weight: 1 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 a05245e276..a166c42a3a 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 @@ -123,12 +123,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -136,6 +144,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/1 protocol: HTTP weight: 2 @@ -143,6 +155,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/2 protocol: HTTP weight: 3 diff --git a/internal/gatewayapi/testdata/httproute-rule-with-non-service-backends-and-app-protocols.out.yaml b/internal/gatewayapi/testdata/httproute-rule-with-non-service-backends-and-app-protocols.out.yaml index ed65d3c4dc..b345ef2540 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-non-service-backends-and-app-protocols.out.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-non-service-backends-and-app-protocols.out.yaml @@ -192,12 +192,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -205,6 +213,10 @@ xdsIR: endpoints: - host: 10.244.0.28 port: 3000 + metadata: + kind: Backend + name: backend-mixed-ip-uds + namespace: default name: httproute/default/httproute-1/rule/0/backend/1 protocol: HTTP2 weight: 1 @@ -220,12 +232,20 @@ xdsIR: name: "" prefix: / - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP2 weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-rule-with-non-service-backends-and-weights.out.yaml b/internal/gatewayapi/testdata/httproute-rule-with-non-service-backends-and-weights.out.yaml index d01585dc0d..486ed82c21 100644 --- a/internal/gatewayapi/testdata/httproute-rule-with-non-service-backends-and-weights.out.yaml +++ b/internal/gatewayapi/testdata/httproute-rule-with-non-service-backends-and-weights.out.yaml @@ -190,12 +190,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -203,6 +211,10 @@ xdsIR: endpoints: - host: 10.244.0.28 port: 3000 + metadata: + kind: Backend + name: backend-mixed-ip-uds + namespace: default name: httproute/default/httproute-1/rule/0/backend/1 protocol: HTTP weight: 2 @@ -218,12 +230,20 @@ xdsIR: name: "" prefix: / - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-api-key-auth-duplicated-api-key.out.yaml b/internal/gatewayapi/testdata/httproute-with-api-key-auth-duplicated-api-key.out.yaml index 6abda8770c..93de024558 100644 --- a/internal/gatewayapi/testdata/httproute-with-api-key-auth-duplicated-api-key.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-api-key-auth-duplicated-api-key.out.yaml @@ -153,12 +153,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-backendref-add-multiple-filters.out.yaml b/internal/gatewayapi/testdata/httproute-with-backendref-add-multiple-filters.out.yaml index 2863ea0278..fd28efae9b 100644 --- a/internal/gatewayapi/testdata/httproute-with-backendref-add-multiple-filters.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-backendref-add-multiple-filters.out.yaml @@ -146,12 +146,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 2 @@ -168,6 +176,10 @@ xdsIR: credentialInjection: credential: '[redacted]' name: httproutefilter/default/credential-injection + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/1 protocol: HTTP weight: 1 @@ -183,6 +195,10 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP @@ -199,6 +215,10 @@ xdsIR: name: add-header-2 value: - some-value + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 8 @@ -206,6 +226,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/1 protocol: HTTP weight: 2 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 fdb5f98d9e..111ac6d47b 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 @@ -115,12 +115,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: backends + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 4f6b086447..bef6839d03 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 @@ -117,12 +117,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 8080 + metadata: + kind: ServiceImport + name: service-import-1 + namespace: backends + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-cors-filter.out.yaml b/internal/gatewayapi/testdata/httproute-with-cors-filter.out.yaml index 677cedf18d..fe08c53e98 100644 --- a/internal/gatewayapi/testdata/httproute-with-cors-filter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-cors-filter.out.yaml @@ -202,12 +202,20 @@ xdsIR: - header4 maxAge: 16m40s destination: + metadata: + kind: HTTPRoute + name: httproute-cors-exact + namespace: default name: httproute/default/httproute-cors-exact/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-cors-exact/rule/0/backend/0 protocol: HTTP weight: 1 @@ -234,12 +242,20 @@ xdsIR: safeRegex: https://.*\.envoyproxy\.io maxAge: 0s destination: + metadata: + kind: HTTPRoute + name: httproute-cors-wildcard + namespace: default name: httproute/default/httproute-cors-wildcard/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-cors-wildcard/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-credential-injection.out.yaml b/internal/gatewayapi/testdata/httproute-with-credential-injection.out.yaml index 668e33e3e7..4220ab6130 100644 --- a/internal/gatewayapi/testdata/httproute-with-credential-injection.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-credential-injection.out.yaml @@ -184,12 +184,20 @@ xdsIR: credential: '[redacted]' name: httproutefilter/default/credential-injection-1 destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -210,12 +218,20 @@ xdsIR: name: httproutefilter/default/credential-injection-2 overwrite: true destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml index 71a408342a..cc9c282ff7 100644 --- a/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-empty-matches.out.yaml @@ -112,12 +112,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-enable-zone-discovery.out.yaml b/internal/gatewayapi/testdata/httproute-with-enable-zone-discovery.out.yaml index de754a19e6..39eb0bbcdf 100644 --- a/internal/gatewayapi/testdata/httproute-with-enable-zone-discovery.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-enable-zone-discovery.out.yaml @@ -135,6 +135,13 @@ xdsIR: port: 10080 routes: - destination: + metadata: + annotations: + foo: bar + kind: HTTPRoute + name: httproute-1 + namespace: default + sectionName: rule-2 name: httproute/default/httproute-1/rule/1 settings: - addressType: IP @@ -142,6 +149,10 @@ xdsIR: - host: 7.7.7.7 port: 8080 zone: antarctica-east1b + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 @@ -161,6 +172,13 @@ xdsIR: sectionName: rule-2 name: httproute/default/httproute-1/rule/1/match/0/* - destination: + metadata: + annotations: + foo: bar + kind: HTTPRoute + name: httproute-1 + namespace: default + sectionName: rule-1 name: httproute/default/httproute-1/rule/0 settings: - addressType: IP @@ -168,6 +186,10 @@ xdsIR: - host: 7.7.7.7 port: 8080 zone: antarctica-east1b + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 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 05f4e89883..70f33f13d6 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 @@ -146,12 +146,20 @@ xdsIR: value: - some-value destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 983d4f12a5..8cdcedf4b9 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 @@ -164,12 +164,20 @@ xdsIR: value: - some-value destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 ef57e4afa8..06eef9cd36 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 @@ -129,12 +129,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 d95d9fe0f1..59337e5402 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 @@ -124,12 +124,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 0815a2e5ba..d0a8b487cf 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 @@ -121,12 +121,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 4d651b8662..e04534f397 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-filter-remove.out.yaml @@ -125,12 +125,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-header-match-diff-number.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-match-diff-number.out.yaml index 8952792385..adeafa01db 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-match-diff-number.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-match-diff-number.out.yaml @@ -169,12 +169,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -197,12 +205,20 @@ xdsIR: name: "" prefix: / - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-header-match-diff-type.out.yaml b/internal/gatewayapi/testdata/httproute-with-header-match-diff-type.out.yaml index 454c35bc9a..db7fe2d524 100644 --- a/internal/gatewayapi/testdata/httproute-with-header-match-diff-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-header-match-diff-type.out.yaml @@ -166,12 +166,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -191,12 +199,20 @@ xdsIR: name: "" prefix: / - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-mixed-kind.out.yaml b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-mixed-kind.out.yaml index 80304dea21..ef6ff77d81 100644 --- a/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-mixed-kind.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-invalid-backend-ref-invalid-mixed-kind.out.yaml @@ -138,12 +138,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -151,6 +159,10 @@ xdsIR: endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: httproute/default/httproute-1/rule/0/backend/1 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-metadata.out.yaml b/internal/gatewayapi/testdata/httproute-with-metadata.out.yaml index 36207a8ef2..1737b662de 100644 --- a/internal/gatewayapi/testdata/httproute-with-metadata.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-metadata.out.yaml @@ -125,12 +125,23 @@ xdsIR: port: 10080 routes: - destination: + metadata: + annotations: + foo: bar + kind: HTTPRoute + name: httproute-1 + namespace: default + sectionName: rule-2 name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 @@ -149,12 +160,23 @@ xdsIR: sectionName: rule-2 name: httproute/default/httproute-1/rule/1/match/0/* - destination: + metadata: + annotations: + foo: bar + kind: HTTPRoute + name: httproute-1 + namespace: default + sectionName: rule-1 name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 fc0931b38c..adad8d9226 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-duplicates.out.yaml @@ -131,12 +131,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -154,6 +162,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0-mirror-0/backend/-1 protocol: HTTP weight: 1 @@ -164,6 +176,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0-mirror-1/backend/-1 protocol: HTTP weight: 1 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 8eae24601e..ac27bf7aa4 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-multiple.out.yaml @@ -156,12 +156,20 @@ xdsIR: value: - set-overwrites-values destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -179,6 +187,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0-mirror-1/backend/-1 protocol: HTTP weight: 1 @@ -189,6 +201,10 @@ xdsIR: endpoints: - host: 7.6.5.4 port: 8080 + metadata: + name: mirror-service + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0-mirror-2/backend/-1 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter-percentage-mirroring.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter-percentage-mirroring.out.yaml index bacdcf73dc..7433d1f414 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter-percentage-mirroring.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter-percentage-mirroring.out.yaml @@ -135,12 +135,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -158,6 +166,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0-mirror-0/backend/-1 protocol: HTTP weight: 1 @@ -169,6 +181,10 @@ xdsIR: endpoints: - host: 7.6.5.4 port: 8080 + metadata: + name: mirror-service + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0-mirror-1/backend/-1 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml index c8ab202112..cba9e71a0f 100644 --- a/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-mirror-filter.out.yaml @@ -125,12 +125,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -148,6 +156,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0-mirror-0/backend/-1 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-multi-gateways-with-same-name.out.yaml b/internal/gatewayapi/testdata/httproute-with-multi-gateways-with-same-name.out.yaml index 670559a762..cf7c5741ca 100644 --- a/internal/gatewayapi/testdata/httproute-with-multi-gateways-with-same-name.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-multi-gateways-with-same-name.out.yaml @@ -167,12 +167,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-multiple-gateways-from-different-ns.out.yaml b/internal/gatewayapi/testdata/httproute-with-multiple-gateways-from-different-ns.out.yaml index df942a0f0a..3a28ae48bc 100644 --- a/internal/gatewayapi/testdata/httproute-with-multiple-gateways-from-different-ns.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-multiple-gateways-from-different-ns.out.yaml @@ -199,12 +199,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: targeted-route + namespace: envoy-gateway name: httproute/envoy-gateway/targeted-route/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/targeted-route/rule/0/backend/0 protocol: HTTP weight: 1 @@ -249,12 +258,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: targeted-route + namespace: envoy-gateway name: httproute/envoy-gateway/targeted-route/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/targeted-route/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-query-match-diff-number.out.yaml b/internal/gatewayapi/testdata/httproute-with-query-match-diff-number.out.yaml index 2929ac417a..e0fc786aee 100644 --- a/internal/gatewayapi/testdata/httproute-with-query-match-diff-number.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-query-match-diff-number.out.yaml @@ -169,12 +169,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -197,12 +205,20 @@ xdsIR: name: name safeRegex: .* - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-query-match-diff-type.out.yaml b/internal/gatewayapi/testdata/httproute-with-query-match-diff-type.out.yaml index b1dee44820..27a83f2eb9 100644 --- a/internal/gatewayapi/testdata/httproute-with-query-match-diff-type.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-query-match-diff-type.out.yaml @@ -166,12 +166,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -191,12 +199,20 @@ xdsIR: exact: "1234" name: id - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 59422a4b87..b34d709288 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 @@ -160,12 +160,20 @@ xdsIR: value: - some-value destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 b869791976..32309d8e78 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 @@ -146,12 +146,20 @@ xdsIR: value: - some-value destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 b363a8a9e8..e5fc445b62 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 @@ -164,12 +164,20 @@ xdsIR: value: - some-value destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 e66b230160..3046d797a8 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 @@ -129,12 +129,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 ed40f923c8..fffd1a978f 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 @@ -124,12 +124,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 2416deb6ff..2cb075b815 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 @@ -121,12 +121,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 3ed7485b1f..5c0178ab79 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 @@ -125,12 +125,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 4a186dbb84..24e6241339 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 @@ -114,12 +114,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 c3f1ed8343..8e968b09ea 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 @@ -112,12 +112,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 bcd212635e..4e97a95865 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 @@ -118,12 +118,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 f0575871a5..65576a970a 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 @@ -116,12 +116,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 76e58792a6..2dafca8627 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 @@ -117,12 +117,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -138,12 +146,20 @@ xdsIR: name: "" prefix: / - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 a8424d0f01..89d97f8258 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 @@ -124,12 +124,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 62b490b3b0..6e1b4a1374 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 @@ -125,12 +125,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 6f61e6614a..03a25fc1f2 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-hostname.out.yaml @@ -122,12 +122,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 4d4fc74033..16731430dd 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 @@ -122,12 +122,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 6fc94e59e7..c010440e9f 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 @@ -124,12 +124,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-regex-match-replace-http.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-regex-match-replace-http.out.yaml index 8b7dcf88af..35fee00386 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-regex-match-replace-http.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-filter-regex-match-replace-http.out.yaml @@ -262,12 +262,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-missing-substitution + namespace: default name: httproute/default/httproute-missing-substitution/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-missing-substitution/rule/0/backend/0 protocol: HTTP weight: 1 @@ -290,12 +298,20 @@ xdsIR: pattern: .* substitution: "" - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -320,12 +336,20 @@ xdsIR: pattern: .* substitution: foo - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -344,12 +368,20 @@ xdsIR: host: name: rewrite.com - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.out.yaml b/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.out.yaml index 9bb808576c..2bcd164e2a 100644 --- a/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.out.yaml +++ b/internal/gatewayapi/testdata/httproute-with-urlrewrite-hostname-filter.out.yaml @@ -266,12 +266,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -293,12 +301,20 @@ xdsIR: fullReplace: null prefixMatchReplace: /rewrite - destination: + metadata: + kind: HTTPRoute + name: httproute-4 + namespace: default name: httproute/default/httproute-4/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-4/rule/0/backend/0 protocol: HTTP weight: 1 @@ -318,12 +334,20 @@ xdsIR: fullReplace: null prefixMatchReplace: /rewrite - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -342,12 +366,20 @@ xdsIR: host: backend: true - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 a1947a8434..ff89f1a6a6 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 @@ -115,12 +115,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml index 1731f40b80..dc66e543ab 100644 --- a/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml +++ b/internal/gatewayapi/testdata/httproutes-with-multiple-matches.out.yaml @@ -300,12 +300,21 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -325,12 +334,21 @@ xdsIR: exact: "yes" name: debug - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 8080 + metadata: + kind: Service + name: service-2 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -346,12 +364,21 @@ xdsIR: name: "" prefix: /v1/example - destination: + metadata: + kind: HTTPRoute + name: httproute-4 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-4/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-4/rule/0/backend/0 protocol: HTTP weight: 1 @@ -371,12 +398,21 @@ xdsIR: name: "" prefix: /v1/status - destination: + metadata: + kind: HTTPRoute + name: httproute-5 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-5/rule/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 8080 + metadata: + kind: Service + name: service-2 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-5/rule/0/backend/0 protocol: HTTP weight: 1 @@ -392,12 +428,21 @@ xdsIR: name: "" prefix: /v1/status - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -413,12 +458,21 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -434,12 +488,21 @@ xdsIR: name: "" prefix: /foo - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: envoy-gateway name: httproute/envoy-gateway/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: envoy-gateway + sectionName: "8080" name: httproute/envoy-gateway/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 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 390a787912..443c88e21f 100644 --- a/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml +++ b/internal/gatewayapi/testdata/merge-valid-multiple-gateways-multiple-routes.out.yaml @@ -240,12 +240,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -290,12 +298,20 @@ xdsIR: port: 8888 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/merge-with-isolated-policies-2.out.yaml b/internal/gatewayapi/testdata/merge-with-isolated-policies-2.out.yaml index 4a93a03edb..486d319367 100644 --- a/internal/gatewayapi/testdata/merge-with-isolated-policies-2.out.yaml +++ b/internal/gatewayapi/testdata/merge-with-isolated-policies-2.out.yaml @@ -518,12 +518,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -578,12 +586,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -638,12 +654,20 @@ xdsIR: port: 10081 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -690,12 +714,20 @@ xdsIR: port: 10081 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-4 + namespace: default name: httproute/default/httproute-4/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-4/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/merge-with-isolated-policies.out.yaml b/internal/gatewayapi/testdata/merge-with-isolated-policies.out.yaml index b56dfd2852..6110df0578 100644 --- a/internal/gatewayapi/testdata/merge-with-isolated-policies.out.yaml +++ b/internal/gatewayapi/testdata/merge-with-isolated-policies.out.yaml @@ -310,12 +310,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -367,12 +375,20 @@ xdsIR: port: 8888 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-override-replace.out.yaml b/internal/gatewayapi/testdata/securitypolicy-override-replace.out.yaml index e714d10ef1..8fbc433018 100644 --- a/internal/gatewayapi/testdata/securitypolicy-override-replace.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-override-replace.out.yaml @@ -321,12 +321,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -361,12 +369,20 @@ xdsIR: - x-header-8 maxAge: 33m20s - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -415,12 +431,20 @@ xdsIR: remoteJWKS: uri: https://one.example.com/jwt/public-key/jwks.json - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-client-cidr.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-client-cidr.out.yaml index eafb01f539..9054babd3e 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-client-cidr.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-client-cidr.out.yaml @@ -302,12 +302,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -326,12 +334,20 @@ xdsIR: authorization: defaultAction: Deny - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -379,12 +395,20 @@ xdsIR: isIPv6: false maskLen: 24 - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-headers-and-methods.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-headers-and-methods.out.yaml index 6d935e04db..5a1996f431 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-headers-and-methods.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-headers-and-methods.out.yaml @@ -158,12 +158,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-jwt-claim.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-jwt-claim.out.yaml index a0c47b78cd..16cd36c3c5 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-jwt-claim.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-authoriztion-jwt-claim.out.yaml @@ -171,12 +171,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml index ab23db803f..d752458a15 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-basic-auth.out.yaml @@ -229,12 +229,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -254,12 +262,20 @@ xdsIR: name: securitypolicy/default/policy-for-http-route-1 users: '[redacted]' - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 @@ -279,12 +295,20 @@ xdsIR: name: securitypolicy/default/policy-for-http-route-1 users: '[redacted]' - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml index 02ac987972..921f6b5af1 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-cors.out.yaml @@ -421,12 +421,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -485,12 +493,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -550,12 +566,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-backend.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-backend.out.yaml index 9c408e6bc0..2368969813 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-backend.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-backend.out.yaml @@ -380,12 +380,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -406,12 +414,20 @@ xdsIR: grpc: authority: primary.foo.com:3000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -420,12 +436,20 @@ xdsIR: - header2 name: securitypolicy/default/policy-for-http-route-1 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 @@ -446,12 +470,20 @@ xdsIR: grpc: authority: primary.foo.com:3000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -460,12 +492,20 @@ xdsIR: - header2 name: securitypolicy/default/policy-for-http-route-1 - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -481,12 +521,20 @@ xdsIR: name: "" prefix: /bar - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-4 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -507,12 +555,20 @@ xdsIR: grpc: authority: service-2.default:8080 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-3--grpc-backendref + namespace: default name: securitypolicy/default/policy-for-http-route-3--grpc-backendref/extauth/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: securitypolicy/default/policy-for-http-route-3--grpc-backendref/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -538,6 +594,10 @@ xdsIR: http: authority: backend-uds.default destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-3-http-backendref + namespace: default name: securitypolicy/default/policy-for-http-route-3-http-backendref/extauth/0 settings: - addressType: IP @@ -545,6 +605,10 @@ xdsIR: - host: "" path: /var/run/uds.sock port: 0 + metadata: + kind: Backend + name: backend-uds + namespace: default name: securitypolicy/default/policy-for-http-route-3-http-backendref/extauth/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-backendref.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-backendref.out.yaml index 265180f8e2..c7efd384a1 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-backendref.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-backendref.out.yaml @@ -245,12 +245,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -271,12 +279,21 @@ xdsIR: grpc: authority: grpc-backend.default:9000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 9000 + metadata: + kind: Service + name: grpc-backend + namespace: default + sectionName: "9000" name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -285,12 +302,20 @@ xdsIR: - header2 name: securitypolicy/default/policy-for-http-route-1 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 @@ -311,12 +336,21 @@ xdsIR: grpc: authority: grpc-backend.default:9000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 9000 + metadata: + kind: Service + name: grpc-backend + namespace: default + sectionName: "9000" name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -325,12 +359,20 @@ xdsIR: - header2 name: securitypolicy/default/policy-for-http-route-1 - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -351,12 +393,21 @@ xdsIR: http: authority: http-backend.envoy-gateway:80 destination: + metadata: + kind: SecurityPolicy + name: policy-for-gateway-1 + namespace: default name: securitypolicy/default/policy-for-gateway-1/extauth/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 80 + metadata: + kind: Service + name: http-backend + namespace: envoy-gateway + sectionName: "80" name: securitypolicy/default/policy-for-gateway-1/extauth/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-body.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-body.out.yaml index 695d9a3de5..c830d54e3f 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-body.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-body.out.yaml @@ -220,12 +220,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -248,12 +256,20 @@ xdsIR: grpc: authority: primary.foo.com:3000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -262,12 +278,20 @@ xdsIR: - header2 name: securitypolicy/default/policy-for-http-route-1 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 @@ -290,12 +314,20 @@ xdsIR: grpc: authority: primary.foo.com:3000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -304,12 +336,20 @@ xdsIR: - header2 name: securitypolicy/default/policy-for-http-route-1 - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-matching-port.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-matching-port.out.yaml index 2b624ff696..9dc5b4cd39 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-matching-port.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-matching-port.out.yaml @@ -153,12 +153,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-port.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-port.out.yaml index f1649f9aac..6523d877f4 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-port.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-port.out.yaml @@ -153,12 +153,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-reference-grant.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-reference-grant.out.yaml index 76de0f521a..6c86e3690e 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-reference-grant.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-reference-grant.out.yaml @@ -154,12 +154,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-service.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-service.out.yaml index dafb7ef1d5..cdb4c5d7bf 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-service.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-invalid-no-service.out.yaml @@ -153,12 +153,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-recomputation.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-recomputation.out.yaml index 2fff1b6dcc..09c9de3fcd 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-recomputation.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-recomputation.out.yaml @@ -219,12 +219,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -245,12 +253,20 @@ xdsIR: grpc: authority: primary.foo.com:3000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -260,12 +276,20 @@ xdsIR: name: securitypolicy/default/policy-for-http-route-1 recomputeRoute: true - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 @@ -286,12 +310,20 @@ xdsIR: grpc: authority: primary.foo.com:3000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: FQDN endpoints: - host: primary.foo.com port: 3000 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -301,12 +333,20 @@ xdsIR: name: securitypolicy/default/policy-for-http-route-1 recomputeRoute: true - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth-with-backendtlspolicy.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth-with-backendtlspolicy.out.yaml index 58274fa252..1e28f95599 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth-with-backendtlspolicy.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth-with-backendtlspolicy.out.yaml @@ -298,12 +298,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -324,12 +332,21 @@ xdsIR: grpc: authority: grpc-backend.default:9000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route + namespace: default name: securitypolicy/default/policy-for-http-route/extauth/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 9000 + metadata: + kind: Service + name: grpc-backend + namespace: default + sectionName: "9000" name: securitypolicy/default/policy-for-http-route/extauth/0/backend/0 protocol: GRPC tls: @@ -344,12 +361,20 @@ xdsIR: - header2 name: securitypolicy/default/policy-for-http-route - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -370,12 +395,21 @@ xdsIR: http: authority: http-backend.envoy-gateway:80 destination: + metadata: + kind: SecurityPolicy + name: policy-for-gateway + namespace: default name: securitypolicy/default/policy-for-gateway/extauth/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 80 + metadata: + kind: Service + name: http-backend + namespace: envoy-gateway + sectionName: "80" name: securitypolicy/default/policy-for-gateway/extauth/0/backend/0 protocol: HTTP tls: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-extauth.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-extauth.out.yaml index e4af7bb720..67b1fe1c23 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-extauth.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-extauth.out.yaml @@ -239,12 +239,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -265,12 +273,21 @@ xdsIR: grpc: authority: grpc-backend.default:9000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 9000 + metadata: + kind: Service + name: grpc-backend + namespace: default + sectionName: "9000" name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -279,12 +296,20 @@ xdsIR: - header2 name: securitypolicy/default/policy-for-http-route-1 - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/1/backend/0 protocol: HTTP weight: 1 @@ -305,12 +330,21 @@ xdsIR: grpc: authority: grpc-backend.default:9000 destination: + metadata: + kind: SecurityPolicy + name: policy-for-http-route-1 + namespace: default name: securitypolicy/default/policy-for-http-route-1/extauth/0 settings: - addressType: IP endpoints: - host: 8.8.8.8 port: 9000 + metadata: + kind: Service + name: grpc-backend + namespace: default + sectionName: "9000" name: securitypolicy/default/policy-for-http-route-1/extauth/0/backend/0 protocol: GRPC weight: 1 @@ -319,12 +353,20 @@ xdsIR: - header2 name: securitypolicy/default/policy-for-http-route-1 - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -345,12 +387,21 @@ xdsIR: http: authority: http-backend.envoy-gateway:80 destination: + metadata: + kind: SecurityPolicy + name: policy-for-gateway-1 + namespace: default name: securitypolicy/default/policy-for-gateway-1/extauth/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 80 + metadata: + kind: Service + name: http-backend + namespace: envoy-gateway + sectionName: "80" name: securitypolicy/default/policy-for-gateway-1/extauth/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml index 4e1249029e..18f579704f 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt-and-invalid-oidc.out.yaml @@ -251,12 +251,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -286,12 +294,20 @@ xdsIR: remoteJWKS: uri: https://one.example.com/jwt/public-key/jwks.json - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt-backendcluster.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt-backendcluster.out.yaml index 502bfcdc34..9c06cb266b 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt-backendcluster.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt-backendcluster.out.yaml @@ -223,12 +223,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -255,12 +263,20 @@ xdsIR: name: foobar remoteJWKS: destination: + metadata: + kind: SecurityPolicy + name: policy-for-route + namespace: default name: securitypolicy/default/policy-for-route/jwt/0 settings: - addressType: FQDN endpoints: - host: foo.bar.com port: 443 + metadata: + kind: Backend + name: backend-fqdn + namespace: default name: securitypolicy/default/policy-for-route/jwt/0/backend/0 protocol: HTTPS tls: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt-local-jwks.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt-local-jwks.out.yaml index 23ddf624b7..1a756588b9 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt-local-jwks.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt-local-jwks.out.yaml @@ -383,12 +383,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -420,12 +428,20 @@ xdsIR: } name: example1 - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -457,12 +473,20 @@ xdsIR: } name: example1 - destination: + metadata: + kind: HTTPRoute + name: httproute-3 + namespace: default name: httproute/default/httproute-3/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-3/rule/0/backend/0 protocol: HTTP weight: 1 @@ -494,12 +518,20 @@ xdsIR: } name: example2 - destination: + metadata: + kind: HTTPRoute + name: httproute-4 + namespace: default name: httproute/default/httproute-4/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-4/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt-optional.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt-optional.out.yaml index 348461b784..ab37cb9f63 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt-optional.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt-optional.out.yaml @@ -299,12 +299,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -362,12 +370,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml index b69177375c..249318b3b3 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt-with-custom-extractor.out.yaml @@ -298,12 +298,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -361,12 +369,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml index 0a76d7ef51..e37cb6048d 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-jwt.out.yaml @@ -290,12 +290,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: GRPCRoute + name: grpcroute-1 + namespace: default name: grpcroute/default/grpcroute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: grpcroute/default/grpcroute-1/rule/0/backend/0 protocol: GRPC weight: 1 @@ -353,12 +361,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc-and-jwt-passthrough.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc-and-jwt-passthrough.out.yaml index 6f46ebd269..96d434f3ca 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc-and-jwt-passthrough.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc-and-jwt-passthrough.out.yaml @@ -162,12 +162,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc-backendcluster.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc-backendcluster.out.yaml index 8cdd0e8599..7edeba6f8d 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc-backendcluster.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc-backendcluster.out.yaml @@ -228,12 +228,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -262,12 +270,20 @@ xdsIR: provider: authorizationEndpoint: https://oauth.foo.com/oauth2/v2/auth destination: + metadata: + kind: SecurityPolicy + name: policy-for-gateway + namespace: envoy-gateway name: securitypolicy/envoy-gateway/policy-for-gateway/oidc/0 settings: - addressType: FQDN endpoints: - host: oauth.foo.com port: 443 + metadata: + kind: Backend + name: backend-fqdn + namespace: envoy-gateway name: securitypolicy/envoy-gateway/policy-for-gateway/oidc/0/backend/0 protocol: HTTPS tls: diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc-custom-cookies.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc-custom-cookies.out.yaml index 15e748a3b3..39ca3fae2c 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc-custom-cookies.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc-custom-cookies.out.yaml @@ -157,12 +157,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 diff --git a/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml b/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml index 1490e9dab8..331caa125e 100644 --- a/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml +++ b/internal/gatewayapi/testdata/securitypolicy-with-oidc.out.yaml @@ -252,12 +252,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -297,12 +305,20 @@ xdsIR: - email - profile - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 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 7e6ccce463..0a096ccbb2 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 @@ -177,12 +177,20 @@ xdsIR: port: 10090 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 @@ -205,12 +213,20 @@ xdsIR: port: 10090 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-2 + namespace: default name: tcproute/default/tcproute-2/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: tcproute/default/tcproute-2/rule/-1/backend/0 protocol: TCP weight: 1 diff --git a/internal/gatewayapi/testdata/tcproute-rule-with-multiple-backends-and-zero-weights.out.yaml b/internal/gatewayapi/testdata/tcproute-rule-with-multiple-backends-and-zero-weights.out.yaml index 6daed53da1..11920e60d3 100644 --- a/internal/gatewayapi/testdata/tcproute-rule-with-multiple-backends-and-zero-weights.out.yaml +++ b/internal/gatewayapi/testdata/tcproute-rule-with-multiple-backends-and-zero-weights.out.yaml @@ -112,12 +112,20 @@ xdsIR: port: 10090 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 @@ -125,6 +133,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: tcproute/default/tcproute-1/rule/-1/backend/1 protocol: TCP weight: 2 @@ -132,6 +144,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-3 + namespace: default + sectionName: "8080" name: tcproute/default/tcproute-1/rule/-1/backend/2 protocol: TCP weight: 3 diff --git a/internal/gatewayapi/testdata/tcproute-with-backend.out.yaml b/internal/gatewayapi/testdata/tcproute-with-backend.out.yaml index 9bc243dbb1..ab79f4cdda 100644 --- a/internal/gatewayapi/testdata/tcproute-with-backend.out.yaml +++ b/internal/gatewayapi/testdata/tcproute-with-backend.out.yaml @@ -122,12 +122,20 @@ xdsIR: port: 10090 routes: - destination: + metadata: + kind: TCPRoute + name: tcproute-1 + namespace: default name: tcproute/default/tcproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: tcproute/default/tcproute-1/rule/-1/backend/0 protocol: TCP weight: 1 diff --git a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml index e65d63a68b..8777f5274f 100644 --- a/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-attaching-to-gateway.out.yaml @@ -105,12 +105,20 @@ xdsIR: port: 10090 routes: - destination: + metadata: + kind: TLSRoute + name: tlsroute-1 + namespace: default name: tlsroute/default/tlsroute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tlsroute/default/tlsroute-1/rule/-1/backend/0 protocol: HTTPS weight: 1 diff --git a/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml b/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml index 253a564d7c..5cb5765652 100644 --- a/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-multiple.out.yaml @@ -139,12 +139,20 @@ xdsIR: port: 10091 routes: - destination: + metadata: + kind: TLSRoute + name: tlsroute-1 + namespace: default name: tlsroute/default/tlsroute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tlsroute/default/tlsroute-1/rule/-1/backend/0 protocol: HTTPS weight: 1 @@ -154,12 +162,20 @@ xdsIR: snis: - foo.com - destination: + metadata: + kind: TLSRoute + name: tlsroute-2 + namespace: default name: tlsroute/default/tlsroute-2/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tlsroute/default/tlsroute-2/rule/-1/backend/0 protocol: HTTPS weight: 1 diff --git a/internal/gatewayapi/testdata/tlsroute-with-backend.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-backend.out.yaml index df45868603..de009e6870 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-backend.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-backend.out.yaml @@ -125,12 +125,20 @@ xdsIR: port: 10090 routes: - destination: + metadata: + kind: TLSRoute + name: tlsroute-1 + namespace: default name: tlsroute/default/tlsroute-1/rule/-1 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: tlsroute/default/tlsroute-1/rule/-1/backend/0 protocol: HTTPS weight: 1 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 d868a5dacf..9e688c5f34 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 @@ -106,12 +106,21 @@ xdsIR: port: 10090 routes: - destination: + metadata: + kind: TLSRoute + name: tlsroute-1 + namespace: default name: tlsroute/default/tlsroute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: service-1 + namespace: test-service-namespace + sectionName: "8080" name: tlsroute/default/tlsroute-1/rule/-1/backend/0 protocol: HTTPS weight: 1 diff --git a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml index 36905c62da..8194f36102 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-hostname.out.yaml @@ -104,12 +104,20 @@ xdsIR: port: 10091 routes: - destination: + metadata: + kind: TLSRoute + name: tlsroute-1 + namespace: default name: tlsroute/default/tlsroute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tlsroute/default/tlsroute-1/rule/-1/backend/0 protocol: HTTPS weight: 1 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 c4f77d15fe..3541eeaa6d 100644 --- a/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml +++ b/internal/gatewayapi/testdata/tlsroute-with-empty-listener-hostname.out.yaml @@ -106,12 +106,20 @@ xdsIR: port: 10091 routes: - destination: + metadata: + kind: TLSRoute + name: tlsroute-1 + namespace: default name: tlsroute/default/tlsroute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: tlsroute/default/tlsroute-1/rule/-1/backend/0 protocol: HTTPS weight: 1 diff --git a/internal/gatewayapi/testdata/tracing-merged-multiple-routes.out.yaml b/internal/gatewayapi/testdata/tracing-merged-multiple-routes.out.yaml index afbe442fed..d7b1cccd33 100644 --- a/internal/gatewayapi/testdata/tracing-merged-multiple-routes.out.yaml +++ b/internal/gatewayapi/testdata/tracing-merged-multiple-routes.out.yaml @@ -247,12 +247,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -297,12 +305,20 @@ xdsIR: port: 8888 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -325,6 +341,10 @@ xdsIR: tracing: authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway name: tracing settings: - endpoints: diff --git a/internal/gatewayapi/testdata/tracing-multiple-routes.out.yaml b/internal/gatewayapi/testdata/tracing-multiple-routes.out.yaml index be6b15a8ec..a88db2bf61 100644 --- a/internal/gatewayapi/testdata/tracing-multiple-routes.out.yaml +++ b/internal/gatewayapi/testdata/tracing-multiple-routes.out.yaml @@ -273,12 +273,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -301,6 +309,10 @@ xdsIR: tracing: authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway name: tracing settings: - endpoints: @@ -350,12 +362,20 @@ xdsIR: port: 8888 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -378,6 +398,10 @@ xdsIR: tracing: authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway name: tracing settings: - endpoints: diff --git a/internal/gatewayapi/testdata/tracing-sampling-fraction.out.yaml b/internal/gatewayapi/testdata/tracing-sampling-fraction.out.yaml index dfa0855b1e..3ef6f73f90 100644 --- a/internal/gatewayapi/testdata/tracing-sampling-fraction.out.yaml +++ b/internal/gatewayapi/testdata/tracing-sampling-fraction.out.yaml @@ -249,12 +249,20 @@ xdsIR: port: 10080 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-1 + namespace: default name: httproute/default/httproute-1/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-1 + namespace: default + sectionName: "8080" name: httproute/default/httproute-1/rule/0/backend/0 protocol: HTTP weight: 1 @@ -299,12 +307,20 @@ xdsIR: port: 8888 routes: - destination: + metadata: + kind: HTTPRoute + name: httproute-2 + namespace: default name: httproute/default/httproute-2/rule/0 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8080 + metadata: + name: service-2 + namespace: default + sectionName: "8080" name: httproute/default/httproute-2/rule/0/backend/0 protocol: HTTP weight: 1 @@ -327,6 +343,10 @@ xdsIR: tracing: authority: otel-collector.monitoring.svc.cluster.local destination: + metadata: + kind: EnvoyProxy + name: test + namespace: envoy-gateway name: tracing settings: - endpoints: diff --git a/internal/gatewayapi/testdata/udproute-rule-with-multiple-backends-and-zero-weights.out.yaml b/internal/gatewayapi/testdata/udproute-rule-with-multiple-backends-and-zero-weights.out.yaml index 5011adeee6..4580b07730 100644 --- a/internal/gatewayapi/testdata/udproute-rule-with-multiple-backends-and-zero-weights.out.yaml +++ b/internal/gatewayapi/testdata/udproute-rule-with-multiple-backends-and-zero-weights.out.yaml @@ -112,12 +112,20 @@ xdsIR: port: 10090 route: destination: + metadata: + kind: UDPRoute + name: udproute-1 + namespace: default name: udproute/default/udproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-1 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/0 protocol: UDP weight: 1 @@ -125,6 +133,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-2 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/1 protocol: UDP weight: 2 @@ -132,6 +144,10 @@ xdsIR: endpoints: - host: 7.7.7.7 port: 8162 + metadata: + name: service-3 + namespace: default + sectionName: "8162" name: udproute/default/udproute-1/rule/-1/backend/2 protocol: UDP weight: 3 diff --git a/internal/gatewayapi/testdata/udproute-with-backend.out.yaml b/internal/gatewayapi/testdata/udproute-with-backend.out.yaml index 30816997d0..ba1ddb8602 100644 --- a/internal/gatewayapi/testdata/udproute-with-backend.out.yaml +++ b/internal/gatewayapi/testdata/udproute-with-backend.out.yaml @@ -122,12 +122,20 @@ xdsIR: port: 10090 route: destination: + metadata: + kind: UDPRoute + name: udproute-1 + namespace: default name: udproute/default/udproute-1/rule/-1 settings: - addressType: IP endpoints: - host: 1.1.1.1 port: 3001 + metadata: + kind: Backend + name: backend-ip + namespace: default name: udproute/default/udproute-1/rule/-1/backend/0 protocol: UDP weight: 1 diff --git a/internal/ir/xds.go b/internal/ir/xds.go index d7c4ec95e3..5d02d7df4e 100644 --- a/internal/ir/xds.go +++ b/internal/ir/xds.go @@ -1491,6 +1491,10 @@ type RouteDestination struct { // reused Name string `json:"name" yaml:"name"` Settings []*DestinationSetting `json:"settings,omitempty" yaml:"settings,omitempty"` + // Metadata is used to enrich envoy route metadata with user and provider-specific information + // RouteDestination metadata is primarily derived from the xRoute resources. In some cases, + // the primary resource is a Policy or Envoy Proxy, when non-xRoute backendRefs are used. + Metadata *ResourceMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` } // Validate the fields within the RouteDestination structure @@ -1600,6 +1604,9 @@ type DestinationSetting struct { // ZoneAwareRoutingEnabled specifies whether to enable Zone Aware Routing for this destination's endpoints. // This is derived from the backend service and depends on having Kubernetes Topology Aware Routing or Traffic Distribution enabled. ZoneAwareRoutingEnabled bool `json:"zoneAwareRoutingEnabled,omitempty" yaml:"zoneAwareRoutingEnabled,omitempty"` + // Metadata is used to enrich envoy route metadata with user and provider-specific information + // The primary metadata for DestinationSettings comes from the Backend resource reference in BackendRef + Metadata *ResourceMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` } // Validate the fields within the DestinationSetting structure diff --git a/internal/ir/zz_generated.deepcopy.go b/internal/ir/zz_generated.deepcopy.go index 63971cc394..8ee15b167f 100644 --- a/internal/ir/zz_generated.deepcopy.go +++ b/internal/ir/zz_generated.deepcopy.go @@ -919,6 +919,11 @@ func (in *DestinationSetting) DeepCopyInto(out *DestinationSetting) { *out = new(DestinationFilters) (*in).DeepCopyInto(*out) } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = new(ResourceMetadata) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationSetting. @@ -3061,6 +3066,11 @@ func (in *RouteDestination) DeepCopyInto(out *RouteDestination) { } } } + if in.Metadata != nil { + in, out := &in.Metadata, &out.Metadata + *out = new(ResourceMetadata) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteDestination. diff --git a/internal/xds/translator/accesslog.go b/internal/xds/translator/accesslog.go index ef9ffca1e1..552ea41df1 100644 --- a/internal/xds/translator/accesslog.go +++ b/internal/xds/translator/accesslog.go @@ -530,6 +530,7 @@ func processClusterForAccessLog(tCtx *types.ResourceVersionTable, al *ir.AccessL backendConnection: traffic.BackendConnection, dns: traffic.DNS, http2Settings: traffic.HTTP2, + metadata: als.Destination.Metadata, }); err != nil { return err } @@ -558,6 +559,7 @@ func processClusterForAccessLog(tCtx *types.ResourceVersionTable, al *ir.AccessL backendConnection: traffic.BackendConnection, dns: traffic.DNS, http2Settings: traffic.HTTP2, + metadata: otel.Destination.Metadata, }); err != nil { return err } diff --git a/internal/xds/translator/cluster.go b/internal/xds/translator/cluster.go index 4b9e01ea51..e33c8cdc07 100644 --- a/internal/xds/translator/cluster.go +++ b/internal/xds/translator/cluster.go @@ -68,6 +68,7 @@ type xdsClusterArgs struct { dns *ir.DNS useClientProtocol bool ipFamily *egv1a1.IPFamily + metadata *ir.ResourceMetadata } type EndpointType int @@ -144,6 +145,7 @@ func buildXdsCluster(args *xdsClusterArgs) (*buildClusterResult, error) { }, }, PerConnectionBufferLimitBytes: buildBackandConnectionBufferLimitBytes(args.backendConnection), + Metadata: buildXdsMetadata(args.metadata), } // 50% is the Envoy default value for panic threshold. No need to explicitly set it in this case. @@ -630,6 +632,7 @@ func buildXdsClusterLoadAssignment(clusterName string, destSettings []*ir.Destin for i, ds := range destSettings { var metadata *corev3.Metadata + if ds.TLS != nil { metadata = &corev3.Metadata{ FilterMetadata: map[string]*structpb.Struct{ @@ -687,6 +690,7 @@ func buildZonalLocalities(metadata *corev3.Metadata, ds *ir.DestinationSetting) }, LbEndpoints: endPts, Priority: ptr.Deref(ds.Priority, 0), + Metadata: buildXdsMetadata(ds.Metadata), } localities = append(localities, locality) } @@ -725,6 +729,7 @@ func buildWeightedLocalities(metadata *corev3.Metadata, ds *ir.DestinationSettin }, LbEndpoints: endpoints, Priority: 0, + Metadata: buildXdsMetadata(ds.Metadata), } // Set locality weight @@ -1031,7 +1036,7 @@ type ExtraArgs struct { } type clusterArgs interface { - asClusterArgs(name string, settings []*ir.DestinationSetting, extras *ExtraArgs) *xdsClusterArgs + asClusterArgs(name string, settings []*ir.DestinationSetting, extras *ExtraArgs, metadata *ir.ResourceMetadata) *xdsClusterArgs } type UDPRouteTranslator struct { @@ -1041,6 +1046,7 @@ type UDPRouteTranslator struct { func (route *UDPRouteTranslator) asClusterArgs(name string, settings []*ir.DestinationSetting, extra *ExtraArgs, + metadata *ir.ResourceMetadata, ) *xdsClusterArgs { return &xdsClusterArgs{ name: name, @@ -1050,6 +1056,7 @@ func (route *UDPRouteTranslator) asClusterArgs(name string, metrics: extra.metrics, dns: route.DNS, ipFamily: extra.ipFamily, + metadata: metadata, } } @@ -1060,6 +1067,7 @@ type TCPRouteTranslator struct { func (route *TCPRouteTranslator) asClusterArgs(name string, settings []*ir.DestinationSetting, extra *ExtraArgs, + metadata *ir.ResourceMetadata, ) *xdsClusterArgs { return &xdsClusterArgs{ name: name, @@ -1075,6 +1083,7 @@ func (route *TCPRouteTranslator) asClusterArgs(name string, backendConnection: route.BackendConnection, dns: route.DNS, ipFamily: extra.ipFamily, + metadata: metadata, } } @@ -1085,6 +1094,7 @@ type HTTPRouteTranslator struct { func (httpRoute *HTTPRouteTranslator) asClusterArgs(name string, settings []*ir.DestinationSetting, extra *ExtraArgs, + metadata *ir.ResourceMetadata, ) *xdsClusterArgs { clusterArgs := &xdsClusterArgs{ name: name, @@ -1096,6 +1106,7 @@ func (httpRoute *HTTPRouteTranslator) asClusterArgs(name string, http2Settings: extra.http2Settings, useClientProtocol: ptr.Deref(httpRoute.UseClientProtocol, false), ipFamily: extra.ipFamily, + metadata: metadata, } // Populate traffic features. diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-with-metadata.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-with-metadata.yaml index fd4d53ecb2..c0b2fce601 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-with-metadata.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-with-metadata.yaml @@ -17,11 +17,24 @@ http: escapedSlashesAction: UnescapeAndRedirect routes: - destination: + metadata: + groupVersion: "gateway.networking.k8s.io/v1" + kind: "HTTPRoute" + name: "first-route-name" + namespace: "first-route-ns" + sectionName: "first-route-rule" + annotations: + foo: bar name: "first-route-dest" settings: - endpoints: - host: 7.7.7.7 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: default + sectionName: "8080" name: "first-route-dest/backend/0" hostname: example.com metadata: @@ -39,11 +52,24 @@ http: - exact: "yes" name: debug - destination: + metadata: + groupVersion: "gateway.networking.k8s.io/v1" + kind: "HTTPRoute" + name: "second-route-name" + namespace: "second-route-ns" + sectionName: "second-route-rule" + annotations: + foo: bar name: "second-route-dest" settings: - endpoints: - host: 8.8.8.8 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: default + sectionName: "8080" name: "second-route-dest/backend/0" hostname: example.com name: envoy-gateway/httproute-3/rule/0/match/0/example.com diff --git a/internal/xds/translator/testdata/in/xds-ir/http-route-with-tlsbundle-multiple-certs.yaml b/internal/xds/translator/testdata/in/xds-ir/http-route-with-tlsbundle-multiple-certs.yaml index 629d71226b..a180b23ab4 100644 --- a/internal/xds/translator/testdata/in/xds-ir/http-route-with-tlsbundle-multiple-certs.yaml +++ b/internal/xds/translator/testdata/in/xds-ir/http-route-with-tlsbundle-multiple-certs.yaml @@ -19,6 +19,11 @@ http: endpoints: - host: 10.244.0.12 port: 8080 + metadata: + kind: Service + name: http-backend + namespace: default + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 protocol: HTTPS tls: @@ -38,6 +43,11 @@ http: name: policy-btls/policies-ca sni: example.com weight: 1 + metadata: + kind: Service + name: http-backend2 + namespace: default + sectionName: "8080" name: httproute/envoy-gateway/httproute-btls/rule/0/backend/1 hostname: '*' name: httproute/envoy-gateway/httproute-btls/rule/0/match/0/* diff --git a/internal/xds/translator/testdata/out/xds-ir/http-route-with-metadata.clusters.yaml b/internal/xds/translator/testdata/out/xds-ir/http-route-with-metadata.clusters.yaml index ba595752d9..a7db25103b 100644 --- a/internal/xds/translator/testdata/out/xds-ir/http-route-with-metadata.clusters.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/http-route-with-metadata.clusters.yaml @@ -12,6 +12,16 @@ serviceName: first-route-dest ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - annotations: + foo: bar + kind: HTTPRoute + name: first-route-name + namespace: first-route-ns + sectionName: first-route-rule name: first-route-dest perConnectionBufferLimitBytes: 32768 type: EDS @@ -29,6 +39,16 @@ serviceName: second-route-dest ignoreHealthOnHostRemoval: true lbPolicy: LEAST_REQUEST + metadata: + filterMetadata: + envoy-gateway: + resources: + - annotations: + foo: bar + kind: HTTPRoute + name: second-route-name + namespace: second-route-ns + sectionName: second-route-rule name: second-route-dest perConnectionBufferLimitBytes: 32768 type: EDS diff --git a/internal/xds/translator/testdata/out/xds-ir/http-route-with-metadata.endpoints.yaml b/internal/xds/translator/testdata/out/xds-ir/http-route-with-metadata.endpoints.yaml index 67b46ffe0f..fc253823c6 100644 --- a/internal/xds/translator/testdata/out/xds-ir/http-route-with-metadata.endpoints.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/http-route-with-metadata.endpoints.yaml @@ -10,6 +10,14 @@ loadBalancingWeight: 1 locality: region: first-route-dest/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: http-backend + namespace: default + sectionName: "8080" - clusterName: second-route-dest endpoints: - lbEndpoints: @@ -22,3 +30,11 @@ loadBalancingWeight: 1 locality: region: second-route-dest/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: http-backend + namespace: default + sectionName: "8080" diff --git a/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle-multiple-certs.endpoints.yaml b/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle-multiple-certs.endpoints.yaml index 94a0deb060..1fb6017ca5 100755 --- a/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle-multiple-certs.endpoints.yaml +++ b/internal/xds/translator/testdata/out/xds-ir/http-route-with-tlsbundle-multiple-certs.endpoints.yaml @@ -14,6 +14,14 @@ loadBalancingWeight: 1 locality: region: httproute/envoy-gateway/httproute-btls/rule/0/backend/0 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: http-backend + namespace: default + sectionName: "8080" - lbEndpoints: - endpoint: address: @@ -28,6 +36,14 @@ loadBalancingWeight: 1 locality: region: httproute/envoy-gateway/httproute-btls/rule/0/backend/1 + metadata: + filterMetadata: + envoy-gateway: + resources: + - kind: Service + name: http-backend2 + namespace: default + sectionName: "8080" - clusterName: httproute/envoy-gateway/httproute-btls-2/rule/0 endpoints: - lbEndpoints: diff --git a/internal/xds/translator/tracing.go b/internal/xds/translator/tracing.go index fb8de98677..1315473497 100644 --- a/internal/xds/translator/tracing.go +++ b/internal/xds/translator/tracing.go @@ -143,6 +143,7 @@ func processClusterForTracing(tCtx *types.ResourceVersionTable, tracing *ir.Trac backendConnection: traffic.BackendConnection, dns: traffic.DNS, http2Settings: traffic.HTTP2, + metadata: tracing.Destination.Metadata, }) } diff --git a/internal/xds/translator/translator.go b/internal/xds/translator/translator.go index 62ffe7f4f2..7b23f358d0 100644 --- a/internal/xds/translator/translator.go +++ b/internal/xds/translator/translator.go @@ -530,6 +530,7 @@ func (t *Translator) addRouteToRouteConfig( httpRoute.Destination.Settings, &HTTPRouteTranslator{httpRoute}, ea, + httpRoute.Destination.Metadata, ) if err != nil { errs = errors.Join(errs, err) @@ -544,7 +545,8 @@ func (t *Translator) addRouteToRouteConfig( setting.Name, tSettings, &HTTPRouteTranslator{httpRoute}, - ea) + ea, + httpRoute.Destination.Metadata) if err != nil { errs = errors.Join(errs, err) } @@ -565,6 +567,7 @@ func (t *Translator) addRouteToRouteConfig( tSocket: nil, endpointType: EndpointTypeStatic, metrics: metrics, + metadata: mrr.Destination.Metadata, }); err != nil { errs = errors.Join(errs, err) } @@ -691,7 +694,8 @@ func (t *Translator) processTCPListenerXdsTranslation( route.Destination.Name, route.Destination.Settings, &TCPRouteTranslator{route}, - &ExtraArgs{metrics: metrics}); err != nil { + &ExtraArgs{metrics: metrics}, + route.Destination.Metadata); err != nil { errs = errors.Join(errs, err) } if route.TLS != nil && route.TLS.Terminate != nil { @@ -782,7 +786,8 @@ func processUDPListenerXdsTranslation( route.Destination.Name, route.Destination.Settings, &UDPRouteTranslator{route}, - &ExtraArgs{metrics: metrics}); err != nil { + &ExtraArgs{metrics: metrics}, + route.Destination.Metadata); err != nil { errs = errors.Join(errs, err) } } @@ -880,8 +885,9 @@ func processXdsCluster(tCtx *types.ResourceVersionTable, settings []*ir.DestinationSetting, route clusterArgs, extras *ExtraArgs, + metadata *ir.ResourceMetadata, ) error { - return addXdsCluster(tCtx, route.asClusterArgs(name, settings, extras)) + return addXdsCluster(tCtx, route.asClusterArgs(name, settings, extras, metadata)) } // findXdsSecret finds a xds secret with the same name, and returns nil if there is no match. diff --git a/internal/xds/translator/utils.go b/internal/xds/translator/utils.go index 11dc8f87a8..5f6c527e77 100644 --- a/internal/xds/translator/utils.go +++ b/internal/xds/translator/utils.go @@ -167,6 +167,7 @@ func createExtServiceXDSCluster(rd *ir.RouteDestination, traffic *ir.TrafficFeat endpointType: endpointType, dns: traffic.DNS, http2Settings: traffic.HTTP2, + metadata: rd.Metadata, }) } diff --git a/release-notes/current.yaml b/release-notes/current.yaml index 1fe5d4424e..8f4ef39f41 100644 --- a/release-notes/current.yaml +++ b/release-notes/current.yaml @@ -12,6 +12,7 @@ new features: | Add an option to OIDC authentication to bypass it and defer to JWT when the request contains an "Authorization: Bearer ..." header. Added support for configuring Subject Alternative Names (SANs) for upstream TLS validation via `BackendTLSPolicy.validation.subjectAltNames`. Added support for local rate limit header. + Added XDS metadata for clusters and endpoints from xRoutes and referenced backend resources (Backend, Service, ServiceImport). bug fixes: |