translator: listener hostnames unset#286
Conversation
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
17dfd36 to
f0bffbb
Compare
Codecov Report
@@ Coverage Diff @@
## main #286 +/- ##
==========================================
+ Coverage 58.14% 58.18% +0.04%
==========================================
Files 31 31
Lines 2788 2791 +3
==========================================
+ Hits 1621 1624 +3
Misses 1069 1069
Partials 98 98
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
| } | ||
|
|
||
| irListener := xdsIR.GetListener(irListenerName(listener)) | ||
| if len(irListener.Hostnames) == 0 { |
There was a problem hiding this comment.
unsure why this condition is not being met via
gateway/internal/gatewayapi/translator.go
Line 429 in a958828
@skriss can you help review this one
There was a problem hiding this comment.
Ah, in Gateway API the absense of any hostname means "match all hostnames" (see https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.Listener -- "when unspecified, all hostnames are matched"). We should probably add an else clause after L429 to explicitly add the * to the IR Listener if no hostname is specified on the Gateway API listener.
There was a problem hiding this comment.
@zirain can you incorporate steve's comments (add else after L429) as well as add some comments in the code stating the WHY. TIA !
fixes: #272
depends on: #276
Signed-off-by: hejianpeng hejianpeng2@huawei.com