-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
6-istio-gateway-rules.yaml
executable file
·51 lines (50 loc) · 1.36 KB
/
6-istio-gateway-rules.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: ingress-gateway-configuration
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*" # Domain name of the external website
---
kind: VirtualService
apiVersion: networking.istio.io/v1alpha3
metadata:
name: fleetman-webapp
namespace: default
spec:
hosts: # which incoming host are we applying the proxy rules to???
- "*" # Copy the value in the gateway hosts - usually a Domain Name
gateways:
- ingress-gateway-configuration
http:
- route:
- destination:
host: fleetman-webapp
subset: original
weight: 50 # 50% of the traffic goes to the original version
- destination:
host: fleetman-webapp
subset: experimental
weight: 50 # 50% of the traffic goes to the experimental version
---
kind: DestinationRule
apiVersion: networking.istio.io/v1alpha3
metadata:
name: fleetman-webapp
namespace: default
spec:
host: fleetman-webapp
subsets:
- labels:
version: original #pointing to deployment with label version=original
name: original
- labels:
version: experimental #pointing to deployment with label version=experimental
name: experimental