Skip to content

use destination port when inferring destinations from vs for sidecar #38725

@yingzhuivy

Description

@yingzhuivy

Bug Description

Suppose there is a client, a vs and a service.
vs has port 8080 but routes to service on port 8081.

When the client defines a sidecar with egress listener depending on vs:8080, the service with port 8081 is not included in the sidecar scope, resulting in client proxy can not get the service configs. If client depends on vs:8081, it works. But I don't think it makes sense since vs does not have port 8081.

I think if client specify vs:8080, istio should be smart enough to pull in service on port 8081.
I believe the code to change is here, if it makes sense, happy to submit a fix.

Version

istio 1.12

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkinglifecycle/automatically-closedIndicates a PR or issue that has been closed automatically.lifecycle/staleIndicates a PR or issue hasn't been manipulated by an Istio team member for a while

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions