-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
7-external-service-entry.yaml
60 lines (56 loc) · 1.44 KB
/
7-external-service-entry.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
apiVersion: v1
kind: Service
metadata:
name: fleetman-driver-monitoring-external
spec:
type: ExternalName
externalName: 2oujlno5e4.execute-api.us-east-1.amazonaws.com
---
# The following example declares a external APIs accessed by internal applications over HTTPS and HTTP
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: fleetman-driver-monitoring
spec:
hosts:
- 2oujlno5e4.execute-api.us-east-1.amazonaws.com
location: MESH_EXTERNAL
ports:
- number: 80
name: http-port
protocol: HTTP
- number: 443
name: https-port-for-tls-origination
protocol: HTTPS
resolution: DNS
---
# The virtual service with port 80 match will forwarded the traffic to the external address
# on port 443 as it only accept https calls
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: fleetman-driver-monitoring
spec:
hosts:
- 2oujlno5e4.execute-api.us-east-1.amazonaws.com
http:
- match:
- port: 80
route:
- destination:
host: 2oujlno5e4.execute-api.us-east-1.amazonaws.com
port:
number: 443
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: fleetman-driver-monitoring
spec:
host: 2oujlno5e4.execute-api.us-east-1.amazonaws.com
trafficPolicy:
portLevelSettings: # Traffic policy to specific port
- port:
number: 443
tls:
mode: SIMPLE