-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjpetstore.yaml
104 lines (104 loc) · 1.94 KB
/
jpetstore.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: jpetstoreweb
spec:
replicas: 1
template:
metadata:
labels:
app: jpetstoreweb
annotations:
sidecar.istio.io/inject: "true"
spec:
containers:
- name: jpetstoreweb
image: <REGISTRY NAMESPACE>/jpetstoreweb
env:
- name: VERSION
value: "1"
ports:
- containerPort: 9080
readinessProbe:
httpGet:
path: /
port: 9080
initialDelaySeconds: 10
periodSeconds: 5
---
kind: Service
apiVersion: v1
metadata:
name: web
spec:
selector:
app: jpetstoreweb
ports:
- port: 80
targetPort: 9080
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: jpetstoredb
spec:
replicas: 1
template:
metadata:
labels:
app: jpetstoredb
annotations:
sidecar.istio.io/inject: "true"
spec:
containers:
- name: jpetstoredb
image: <REGISTRY NAMESPACE>/jpetstoredb
ports:
- containerPort: 3306
env:
- name: MYSQL_ROOT_PASSWORD
value: "foobar"
- name: MYSQL_DATABASE
value: "jpetstore"
- name: MYSQL_USER
value: "jpetstore"
- name: MYSQL_PASSWORD
value: "foobar"
---
kind: Service
apiVersion: v1
metadata:
name: db
spec:
selector:
app: jpetstoredb
ports:
- port: 3306
targetPort: 3306
---
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: jpetstore-ingress
spec:
rules:
- host: jpetstore.<CLUSTER DOMAIN>
http:
paths:
- path: /
backend:
serviceName: web
servicePort: 80
---
kind: EgressRule
apiVersion: config.istio.io/v1alpha2
metadata:
name: watson-egress-rule
spec:
destination:
service: gateway-a.watsonplatform.net
ports:
- port: 80
protocol: http
- port: 443
protocol: https