@@ -119,11 +119,12 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource
119119 case gwapiv1 .HTTPProtocolType , gwapiv1 .HTTPSProtocolType :
120120 irListener := & ir.HTTPListener {
121121 CoreListenerDetails : ir.CoreListenerDetails {
122- Name : irListenerName (listener ),
123- Address : address ,
124- Port : uint32 (containerPort ),
125- Metadata : buildListenerMetadata (listener , gateway ),
126- IPFamily : ipFamily ,
122+ Name : irListenerName (listener ),
123+ Address : address ,
124+ Port : uint32 (containerPort ),
125+ ExternalPort : uint32 (listener .Port ),
126+ Metadata : buildListenerMetadata (listener , gateway ),
127+ IPFamily : ipFamily ,
127128 },
128129 TLS : irTLSConfigs (listener .tlsSecrets ... ),
129130 Path : ir.PathSettings {
@@ -146,10 +147,11 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource
146147 case gwapiv1 .TCPProtocolType , gwapiv1 .TLSProtocolType :
147148 irListener := & ir.TCPListener {
148149 CoreListenerDetails : ir.CoreListenerDetails {
149- Name : irListenerName (listener ),
150- Address : address ,
151- Port : uint32 (containerPort ),
152- IPFamily : ipFamily ,
150+ Name : irListenerName (listener ),
151+ Address : address ,
152+ Port : uint32 (containerPort ),
153+ ExternalPort : uint32 (listener .Port ),
154+ IPFamily : ipFamily ,
153155 },
154156
155157 // Gateway is processed firstly, then ClientTrafficPolicy, then xRoute.
@@ -162,9 +164,10 @@ func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR resource
162164 case gwapiv1 .UDPProtocolType :
163165 irListener := & ir.UDPListener {
164166 CoreListenerDetails : ir.CoreListenerDetails {
165- Name : irListenerName (listener ),
166- Address : address ,
167- Port : uint32 (containerPort ),
167+ Name : irListenerName (listener ),
168+ Address : address ,
169+ Port : uint32 (containerPort ),
170+ ExternalPort : uint32 (listener .Port ),
168171 },
169172 }
170173 xdsIR [irKey ].UDP = append (xdsIR [irKey ].UDP , irListener )
0 commit comments