Skip to content
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

Merged
merged 6 commits into from
Dec 14, 2023
Merged

fix gateway name #672

merged 6 commits into from
Dec 14, 2023

Conversation

johnlanni
Copy link
Collaborator

Ⅰ. 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

@johnlanni
Copy link
Collaborator Author

cc @SpecialYang

@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2023

Codecov Report

Merging #672 (1684ff5) into main (a554ee1) will decrease coverage by 0.06%.
Report is 3 commits behind head on main.
The diff coverage is 39.13%.

Additional details and impacted files

Impacted file tree graph

@@            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     
Files Coverage Δ
pkg/ingress/kube/ingress/controller.go 62.27% <100.00%> (-0.04%) ⬇️
pkg/ingress/config/ingress_config.go 13.65% <83.33%> (-0.15%) ⬇️
pkg/ingress/config/kingress_config.go 16.88% <66.66%> (-0.43%) ⬇️
pkg/ingress/kube/ingressv1/controller.go 5.42% <0.00%> (+<0.01%) ⬆️
pkg/ingress/kube/kingress/controller.go 42.49% <0.00%> (+0.07%) ⬆️
pkg/ingress/kube/common/tool.go 51.17% <0.00%> (ø)

... and 1 file with indirect coverage changes

Copy link
Collaborator

@SpecialYang SpecialYang left a 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, "*"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

之前弄个成员变量的方法是好的

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样更内聚一些,代码可读性好一些,成员变量没有太大必要

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那这样会一直重复计算吧?毕竟是hash计算

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯 是的,不过我觉得这里的性能影响也很小,相比下还是可读性重要些

@SpecialYang SpecialYang merged commit 817925e into alibaba:main Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

配置多级域名出现无法访问的问题
3 participants