Hi,
I’m having some trouble with ‘consistentHash’ with a service entry.
My service entry is a external service with static resolution having multiple endpoints, i was expecting to make a request with a header and subsequent request would use the same service entry endpoint. But that doesn’t seem to work out.
DestinationRule:
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: external-host
spec:
host: my-host.com
trafficPolicy:
loadBalancer:
consistentHash:
httpHeaderName: x-test
ServiceEntry:
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: external-host
spec:
hosts:
- my-host.com
addresses:
- 196.168.34.1/32
ports:
- number: 80
name: http
protocol: HTTP
- number: 443
name: https
protocol: HTTPS
location: MESH_EXTERNAL
resolution: STATIC
endpoints:
- address: x.x.x.x
ports:
https: 8080
- address: x.x.x.x
ports:
https: 8081
I was expecting to see either x.x.x.x:8080 or x.x.x.x:8081 on my logs while using the same header for the host my-host.com but that’s not happening. Has anyone been through this? Is this a valid use case for Istio?