Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,14 @@ xds:
useRemoteAddress: true
name: default/eg/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: eg
namespace: default
sectionName: http
name: default/eg/http
perConnectionBufferLimitBytes: 32768
- activeState:
Expand Down Expand Up @@ -1239,6 +1247,14 @@ xds:
useRemoteAddress: true
name: default/eg/grpc
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: eg
namespace: default
sectionName: grpc
name: default/eg/grpc
perConnectionBufferLimitBytes: 32768
- activeState:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,20 @@
"name": "default/eg/http"
},
"maxConnectionsToAcceptPerSocketEvent": 1,
"metadata": {
"filterMetadata": {
"envoy-gateway": {
"resources": [
{
"kind": "Gateway",
"name": "eg",
"namespace": "default",
"sectionName": "http"
}
]
}
}
},
"name": "default/eg/http",
"perConnectionBufferLimitBytes": 32768
}
Expand Down Expand Up @@ -1130,6 +1144,20 @@
"name": "default/eg/grpc"
},
"maxConnectionsToAcceptPerSocketEvent": 1,
"metadata": {
"filterMetadata": {
"envoy-gateway": {
"resources": [
{
"kind": "Gateway",
"name": "eg",
"namespace": "default",
"sectionName": "grpc"
}
]
}
}
},
"name": "default/eg/grpc",
"perConnectionBufferLimitBytes": 32768
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,14 @@ xds:
useRemoteAddress: true
name: default/eg/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: eg
namespace: default
sectionName: http
name: default/eg/http
perConnectionBufferLimitBytes: 32768
- activeState:
Expand Down Expand Up @@ -692,6 +700,14 @@ xds:
useRemoteAddress: true
name: default/eg/grpc
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: eg
namespace: default
sectionName: grpc
name: default/eg/grpc
perConnectionBufferLimitBytes: 32768
- activeState:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ xds:
useRemoteAddress: true
name: default/eg/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: eg
namespace: default
sectionName: http
name: default/eg/http
perConnectionBufferLimitBytes: 32768
- activeState:
Expand Down Expand Up @@ -255,6 +263,14 @@ xds:
useRemoteAddress: true
name: default/eg/grpc
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: eg
namespace: default
sectionName: grpc
name: default/eg/grpc
perConnectionBufferLimitBytes: 32768
- activeState:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,20 @@
"name": "envoy-gateway-system/eg/http"
},
"maxConnectionsToAcceptPerSocketEvent": 1,
"metadata": {
"filterMetadata": {
"envoy-gateway": {
"resources": [
{
"kind": "Gateway",
"name": "eg",
"namespace": "envoy-gateway-system",
"sectionName": "http"
}
]
}
}
},
"name": "envoy-gateway-system/eg/http",
"perConnectionBufferLimitBytes": 32768
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,14 @@ xds:
useRemoteAddress: true
name: envoy-gateway-system/eg/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: eg
namespace: envoy-gateway-system
sectionName: http
name: envoy-gateway-system/eg/http
perConnectionBufferLimitBytes: 32768
- '@type': type.googleapis.com/envoy.admin.v3.RoutesConfigDump
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,13 @@ xds:
useRemoteAddress: true
name: envoy-gateway-system/eg/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: eg
namespace: envoy-gateway-system
sectionName: http
name: envoy-gateway-system/eg/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@ xds:
useRemoteAddress: true
name: envoy-gateway-system/eg/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: eg
namespace: envoy-gateway-system
sectionName: http
name: envoy-gateway-system/eg/http
perConnectionBufferLimitBytes: 32768
- '@type': type.googleapis.com/envoy.admin.v3.RoutesConfigDump
Expand Down
17 changes: 16 additions & 1 deletion internal/xds/translator/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,23 @@ func buildXdsMetadata(metadata *ir.ResourceMetadata) *corev3.Metadata {
return nil
}

return buildXdsMetadataFromMultiple([]*ir.ResourceMetadata{metadata})
}

func buildXdsMetadataFromMultiple(metadata []*ir.ResourceMetadata) *corev3.Metadata {
if metadata == nil {
return nil
}

resourcesList := &structpb.ListValue{}
resourcesList.Values = append(resourcesList.Values, buildResourceMetadata(metadata))
for _, md := range metadata {
if md != nil {
resourcesList.Values = append(resourcesList.Values, buildResourceMetadata(md))
}
}
if len(resourcesList.Values) == 0 {
return nil
}

return &corev3.Metadata{
FilterMetadata: map[string]*structpb.Struct{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,5 +345,13 @@
useRemoteAddress: true
name: envoy-gateway/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: envoy-gateway
sectionName: http
name: envoy-gateway/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,13 @@
useRemoteAddress: true
name: envoy-gateway/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: envoy-gateway
sectionName: http
name: envoy-gateway/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,13 @@
useRemoteAddress: true
name: envoy-gateway/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: envoy-gateway
sectionName: http
name: envoy-gateway/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,13 @@
useRemoteAddress: true
name: default/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: default
sectionName: http
name: default/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,13 @@
useRemoteAddress: true
name: envoy-gateway/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: envoy-gateway
sectionName: http
name: envoy-gateway/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,13 @@
useRemoteAddress: true
name: envoy-gateway/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: envoy-gateway
sectionName: http
name: envoy-gateway/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,13 @@
useRemoteAddress: true
name: envoy-gateway/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: envoy-gateway
sectionName: http
name: envoy-gateway/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,13 @@
useRemoteAddress: true
name: envoy-gateway/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: envoy-gateway
sectionName: http
name: envoy-gateway/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,13 @@
useRemoteAddress: true
name: default/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: default
sectionName: http
name: default/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,13 @@
useRemoteAddress: true
name: envoy-gateway/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: envoy-gateway
sectionName: http
name: envoy-gateway/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,13 @@
useRemoteAddress: true
name: default/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: default
sectionName: http
name: default/gateway-1/http
perConnectionBufferLimitBytes: 32768
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,13 @@
useRemoteAddress: true
name: envoy-gateway/gateway-1/http
maxConnectionsToAcceptPerSocketEvent: 1
metadata:
filterMetadata:
envoy-gateway:
resources:
- kind: Gateway
name: gateway-1
namespace: envoy-gateway
sectionName: http
name: envoy-gateway/gateway-1/http
perConnectionBufferLimitBytes: 32768
Loading