Add alternative canary routing

This commit is contained in:
Stefan Prodan
2018-10-09 18:18:48 +03:00
parent 276fdfc0ff
commit 3eb60a8447
4 changed files with 86 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: podinfo
namespace: test
spec:
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
hosts:
- app.istio.weavedx.com
- podinfo
http:
- match:
- headers:
user-agent:
regex: ^(?!.*Chrome)(?=.*\bSafari\b).*$
route:
- destination:
host: podinfo
port:
number: 9898
weight: 0
- destination:
host: podinfo-canary
port:
number: 9898
weight: 100
- route:
- destination:
host: podinfo
port:
number: 9898
weight: 100

View File

@@ -0,0 +1,25 @@
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: podinfo
namespace: test
labels:
app: podinfo
spec:
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
hosts:
- app.istio.weavedx.com
- podinfo
http:
- route:
- destination:
host: podinfo
port:
number: 9898
weight: 100
mirror:
host: podinfo-canary
port:
number: 9898

View File

@@ -0,0 +1,26 @@
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: podinfo
namespace: test
labels:
app: podinfo
spec:
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
hosts:
- app.istio.weavedx.com
- podinfo
http:
- route:
- destination:
host: podinfo
port:
number: 9898
weight: 100
- destination:
host: podinfo-canary
port:
number: 9898
weight: 0

View File

@@ -8,6 +8,7 @@ metadata:
spec:
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
hosts:
- app.istio.weavedx.com
- podinfo