-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix gateway name #672
fix gateway name #672
Conversation
cc @SpecialYang |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #672 +/- ##
==========================================
- Coverage 35.63% 35.58% -0.06%
==========================================
Files 73 73
Lines 10447 10440 -7
==========================================
- Hits 3723 3715 -8
Misses 6438 6438
- Partials 286 287 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没看gw vs资源的name在哪生成的?
@@ -319,7 +315,7 @@ func (m *KIngressConfig) convertVirtualService(configs []common.WrapperConfig) [ | |||
common.CreateConvertedName(m.clusterId, cleanHost), | |||
common.CreateConvertedName(constants.IstioIngressGatewayName, cleanHost)} | |||
if host != "*" { | |||
gateways = append(gateways, m.globalGatewayName) | |||
gateways = append(gateways, m.namespace+"/"+common.CreateConvertedName(m.clusterId, "*")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前弄个成员变量的方法是好的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这样更内聚一些,代码可读性好一些,成员变量没有太大必要
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那这样会一直重复计算吧?毕竟是hash计算
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯 是的,不过我觉得这里的性能影响也很小,相比下还是可读性重要些
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
fix #667
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews