-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathistio-egress-gateway.yaml
75 lines (75 loc) · 1.31 KB
/
istio-egress-gateway.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
name: yahoo
spec:
hosts:
- www.yahoo.com
ports:
- number: 443
name: tls
protocol: TLS
resolution: DNS
---
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
name: istio-egressgateway
spec:
selector:
istio: egressgateway
servers:
- port:
number: 443
name: tls
protocol: TLS
hosts:
- www.yahoo.com
tls:
mode: PASSTHROUGH
---
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
name: egressgateway-for-yahoo
spec:
host: istio-egressgateway.istio-system.svc.cluster.local
subsets:
- name: yahoo
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
name: direct-yahoo-through-egress-gateway
spec:
hosts:
- www.yahoo.com
gateways:
- istio-egressgateway
- mesh
tls:
- match:
- gateways:
- mesh
port: 443
sniHosts:
- www.yahoo.com
route:
- destination:
host: istio-egressgateway.istio-system.svc.cluster.local
subset: yahoo
port:
number: 443
weight: 100
- match:
- gateways:
- istio-egressgateway
port: 443
sniHosts:
- www.yahoo.com
route:
- destination:
host: www.yahoo.com
port:
number: 443
weight: 100