Skip to content

Commit

Permalink
fix : service mutiple port
Browse files Browse the repository at this point in the history
  • Loading branch information
njy17 committed Dec 1, 2023
1 parent d5e28b0 commit 6ac845e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apiserver/xdsserverv3/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,14 @@ func (x *XdsResourceGenerator) buildSidecarXDSCache(registryInfo map[string]map[
Name: xdsNode.GetSelfService(),
},
}

if services,ok:=registryInfo[xdsNode.GetSelfNamespace()];ok{
opt.Services=services
}

opt.TrafficDirection = corev3.TrafficDirection_OUTBOUND
// 构建 INBOUND LDS 资源
// 构建 OUTBOUND LDS 资源
x.buildAndDeltaUpdate(resource.LDS, opt)
// 构建 INBOUND RDS 资源
// 构建 OUTBOUND RDS 资源
x.buildAndDeltaUpdate(resource.RDS, opt)
opt.TrafficDirection = corev3.TrafficDirection_INBOUND
// 构建 INBOUND LDS 资源
Expand Down

0 comments on commit 6ac845e

Please sign in to comment.