-
Notifications
You must be signed in to change notification settings - Fork 290
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
Conversation
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>
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. |
internal/gatewayapi/route.go
Outdated
Host: service.Spec.ClusterIP, | ||
Port: uint32(*backendRef.Port), | ||
}) | ||
weight := uint32(0) |
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.
lets rm this, since it wasn't part of the orig logic
internal/gatewayapi/route.go
Outdated
Host: service.Spec.ClusterIP, | ||
Port: uint32(*backendRef.Port), | ||
}) | ||
weight := uint32(0) |
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.
same comment as above
thanks @muyuan0 , added some comments |
Signed-off-by: muyuan0 <127020730+muyuan0@users.noreply.github.com>
Codecov Report
📣 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
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>
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.
LGTM, thanks !
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.