Canarying with destinationweight and stickiness

Has anybody been able to get stickiness to work with destination weights? I’m finding that I don’t stick to a specific subset. Below are 2 example files.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: my-service-virtual-service
spec:
  hosts:
    - my-service
  http:
    - match:
      - uri:
          prefix: /
      route:
        - destination:
            port:
              number: 6065
            host: my-service
            subset: stable
          weight: 95
        - destination:
            port:
              number: 6065
            host: my-service
            subset: canary
          weight: 5
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: canary-destination-rule
spec:
  host: "my-service"
  trafficPolicy:
    loadBalancer:
      consistentHash:
        httpCookie:
          name: x-some-cookie
          ttl: 0s
  subsets:
  - name: stable
    labels:
      release: stable
  - name: canary
    labels:
      release: canary

Did you get any further with this? I have tried doing the same with similar config and experiencing the same issue. Not getting stickyness to a subset. Using istio 1.0.5

I’ve also tried with the bookinfo app - creating a v2 product page and then trying to do stick with weights. But it also didn’t work. I’ve had to manually deploy x pods of version 1 and y pods of version 2 to achieve the desired result

Hello,

Yes. I had to apply a traffic policy in the destination rule to the specific port

 trafficPolicy: 
   portLevelSettings:
   - port:
       number: {{ .port }}
     tls:
       mode: ISTIO_MUTUAL