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

chore: unify the way to create RouteDestination #1104

Merged
merged 6 commits into from
Mar 8, 2023

Conversation

muyuan0
Copy link
Contributor

@muyuan0 muyuan0 commented Mar 6, 2023

Fix #786
When taking a look at issue 786, I found that different places use different way to create RouteDestination.
This commit unifies the behavior.

When taking a look at issue 786, I found that different places use
different way to create RouteDestination.
This commit unifies the behavior.

Signed-off-by: muyuan0 <127020730+muyuan0@users.noreply.github.com>
@muyuan0 muyuan0 marked this pull request as ready for review March 6, 2023 15:28
@muyuan0 muyuan0 requested a review from a team as a code owner March 6, 2023 15:28
@muyuan0
Copy link
Contributor Author

muyuan0 commented Mar 6, 2023

I would like to put each field into private, but it will break the yaml marshal used in the test (in/out diff). However, we can solve it if this type of refactoring is welcome.

Host: service.Spec.ClusterIP,
Port: uint32(*backendRef.Port),
})
weight := uint32(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

lets rm this, since it wasn't part of the orig logic

Host: service.Spec.ClusterIP,
Port: uint32(*backendRef.Port),
})
weight := uint32(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as above

@arkodg
Copy link
Contributor

arkodg commented Mar 6, 2023

thanks @muyuan0 , added some comments

Signed-off-by: muyuan0 <127020730+muyuan0@users.noreply.github.com>
Signed-off-by: muyuan0 <127020730+muyuan0@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2023

Codecov Report

Merging #1104 (1677eb1) into main (d530bb9) will increase coverage by 0.09%.
The diff coverage is 53.19%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1104      +/-   ##
==========================================
+ Coverage   62.47%   62.56%   +0.09%     
==========================================
  Files          72       72              
  Lines        9430     9449      +19     
==========================================
+ Hits         5891     5912      +21     
  Misses       3133     3133              
+ Partials      406      404       -2     
Impacted Files Coverage Δ
internal/ir/xds.go 72.90% <0.00%> (-1.24%) ⬇️
internal/ir/zz_generated.deepcopy.go 12.39% <16.66%> (+0.04%) ⬆️
internal/gatewayapi/route.go 86.33% <100.00%> (ø)
internal/xds/translator/authentication.go 64.31% <100.00%> (ø)
internal/xds/translator/cluster.go 100.00% <100.00%> (ø)
internal/xds/translator/ratelimit.go 92.38% <100.00%> (ø)
internal/xds/translator/listener.go 81.34% <0.00%> (-0.50%) ⬇️
...rnal/infrastructure/kubernetes/proxy_deployment.go 91.37% <0.00%> (+0.47%) ⬆️
internal/provider/kubernetes/controller.go 51.24% <0.00%> (+1.47%) ⬆️
internal/provider/kubernetes/helpers.go 83.78% <0.00%> (+4.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: muyuan0 <127020730+muyuan0@users.noreply.github.com>
Signed-off-by: muyuan0 <127020730+muyuan0@users.noreply.github.com>
internal/ir/xds.go Outdated Show resolved Hide resolved
Signed-off-by: muyuan0 <127020730+muyuan0@users.noreply.github.com>
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

@arkodg arkodg merged commit 2d67b2d into envoyproxy:main Mar 8, 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.

ir.RouteDestination weight ?
3 participants