From 27de9ce1519c0fd27a436310134bc15d09930297 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Sun, 10 Feb 2019 11:47:01 +0200 Subject: [PATCH] Session affinity incompatible with destinations weight - consistent hashing does not apply across multiple subsets --- artifacts/routing/destination-rule.yaml | 45 +++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 artifacts/routing/destination-rule.yaml diff --git a/artifacts/routing/destination-rule.yaml b/artifacts/routing/destination-rule.yaml new file mode 100644 index 00000000..2bdea8f2 --- /dev/null +++ b/artifacts/routing/destination-rule.yaml @@ -0,0 +1,45 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: podinfo + namespace: test +spec: + gateways: + - public-gateway.istio-system.svc.cluster.local + - mesh + hosts: + - podinfo.istio.weavedx.com + - podinfo + http: + - route: + - destination: + host: podinfo + subset: primary + weight: 50 + - destination: + host: podinfo + subset: canary + weight: 50 +--- +apiVersion: networking.istio.io/v1alpha3 +kind: DestinationRule +metadata: + name: podinfo-destination + namespace: test +spec: + host: podinfo + trafficPolicy: + loadBalancer: + consistentHash: + httpCookie: + name: istiouser + ttl: 30s + subsets: + - name: primary + labels: + app: podinfo + role: primary + - name: canary + labels: + app: podinfo + role: canary