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

Make service instances order the same as ports defined at service spec #36462

Merged
merged 4 commits into from
Dec 20, 2021

Conversation

bianpengyuan
Copy link
Contributor

@bianpengyuan bianpengyuan commented Dec 10, 2021

fix #36434

One port can only talk one protocol. This make selection of protocol stable if user have multiple services port pointing to the same target port with different protocols.

@bianpengyuan bianpengyuan requested a review from a team as a code owner December 10, 2021 08:01
@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 10, 2021
@bianpengyuan bianpengyuan added release-notes-none Indicates a PR that does not require release notes. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 10, 2021
@bianpengyuan bianpengyuan requested a review from a team as a code owner December 10, 2021 22:18
@istio-testing istio-testing added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 10, 2021
@bianpengyuan bianpengyuan changed the title Remove protocol from service instance target pods dedup. Sort target ports when building ServiceInstances Dec 11, 2021
@howardjohn
Copy link
Member

howardjohn commented Dec 15, 2021 via email

@bianpengyuan
Copy link
Contributor Author

One thing I do not fully understand there - which one wins? is it just the
first one?

Yeah, with 7e9835f it will be the first one at service spec.

@istio-testing istio-testing added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 16, 2021
@@ -670,7 +670,7 @@ func TestGetProxyServiceInstancesWithMultiIPsAndTargetPorts(t *testing.T) {
TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: 8080},
},
},
wantNum: 2,
wantNum: 1,
Copy link
Member

Choose a reason for hiding this comment

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

Might be worth adding higher level tests that validate the listeners/clusters are right. Maybe in sidecar_simulation_test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to, but simulation tests are all based on service entry, which does not suffer from this dedup logic.

@howardjohn
Copy link
Member

Also probably worth a release note

@bianpengyuan bianpengyuan changed the title Sort target ports when building ServiceInstances Remove protocol from service instance target pods dedup. Dec 16, 2021
@bianpengyuan bianpengyuan requested review from a team as code owners December 17, 2021 08:04
@bianpengyuan
Copy link
Contributor Author

Also probably worth a release note

added a release note.

@istio-testing istio-testing added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 19, 2021
@bianpengyuan bianpengyuan added do-not-merge/hold Block automatic merging of a PR. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 19, 2021
@bianpengyuan bianpengyuan changed the title Remove protocol from service instance target pods dedup. Make service instances order the same as ports defined at service spec Dec 19, 2021
@istio-testing istio-testing added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Http1.DPE error for tcp incoming traffic occassionally
4 participants