How can I configure `hash_key` for LB to hash semantic name(hostname), not IP address?

Hi, I’m currently using consistent hashing LB to load balance workloads into upstream servers by x-shard-key header of requests, and I have two different ports opened in server for different purposes (sdk port, admin port).

Since I have different ports, requests towards sdk port and admin port will route to different servers even they have same x-shard-key (I’m assuming that this is because envoy LB will hash different ip addresses(eg: [service dns]:[sdk port] and [service dns]:[admin port]), envoy clusters(sdk service and admin service) will have different upstream hash key for routing).

But I want both requests to route to same server and ensure “pod affinity” of requests when they have same x-shard-key header.

Therefore, I want to use “hash_key” on envoy to make envoy lb hash on logical hostname to route to the same server (set to same logical hostname on sdk endpoint and admin endpoint).

But I have no idea how to set hash_key on istio, I have found same github issue regarding this, but It did not solve my problem.

Any thoughts? Other approaches will also be appreciated. Thank you!