Skip to content

Commit

Permalink
don't use servicePort for an inbound, we are interested in proxies port
Browse files Browse the repository at this point in the history
Signed-off-by: John Cowen <[email protected]>
  • Loading branch information
johncowen committed Nov 28, 2024
1 parent b7c8327 commit 28f752a
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ export const DataplaneNetworking = {
}]
: inbounds.map((item) => {
const address = item.address ?? networking.address
const port = item.servicePort ?? item.port
return {
...item,
// the name can be used to lookup listener envoy stats
name: `localhost_${port}`,
listenerAddress: `${address}_${port}`,
name: `localhost_${item.port}`,
listenerAddress: `${address}_${item.port}`,
// If a health property is unset the inbound is considered healthy
state: typeof item.state !== 'undefined' ? item.state : 'Ready',
service: item.tags['kuma.io/service'],
Expand All @@ -94,7 +93,7 @@ export const DataplaneNetworking = {
// inbound address, advertisedAddress, networkingAddress because externally accessible address
addressPort: `${item.address ?? networking.advertisedAddress ?? networking.address}:${item.port}`,
// inbound serviceAddress, inbound address, networkingAddress because the internal services accessible address
serviceAddressPort: `${item.serviceAddress ?? address}:${port}`,
serviceAddressPort: `${item.serviceAddress ?? address}:${item.servicePort ?? item.port}`,
}
}),
outbounds: DataplaneOutbound.fromCollection(outbounds),
Expand Down

0 comments on commit 28f752a

Please sign in to comment.