forked from kyma-project/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
110 lines (110 loc) · 2.16 KB
/
deployment.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
105
106
107
108
109
110
apiVersion: gateway.kyma-project.io/v1alpha2
kind: Api
metadata:
name: order-front-api
labels:
example: tracing
spec:
service:
name: order-front
port: 8080
hostname: order-front-api
---
apiVersion: v1
kind: Service
metadata:
name: order-front
labels:
example: tracing
app: order-front
spec:
type: ClusterIP
ports:
- port: 8080
protocol: TCP
name: http
selector:
app: order-front
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: order-front
labels:
example: tracing
app: order-front
spec:
replicas: 1
selector:
matchLabels:
app: order-front
example: tracing
template:
metadata:
labels:
app: order-front
example: tracing
spec:
containers:
- name: order-front
image: eu.gcr.io/kyma-project/snapshot/example/tracing-order-front:PR-64
imagePullPolicy: IfNotPresent
args:
- --port=8080
- --db-url=http://db-service:8017/orders
ports:
- containerPort: 8080
resources:
requests:
cpu: "100m"
limits:
memory: "32M"
---
apiVersion: v1
kind: Service
metadata:
name: db-service
labels:
example: tracing
app: db-service
spec:
type: ClusterIP
ports:
- name: http
port: 8017
protocol: TCP
selector:
app: db-service
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: db-service
labels:
example: tracing
app: db-service
spec:
replicas: 1
selector:
matchLabels:
example: tracing
app: db-service
template:
metadata:
labels:
example: tracing
app: db-service
spec:
imagePullSecrets:
containers:
# replace the repository URL with your own repository (e.g. {DockerID}/http-db-service:0.0.x for Docker Hub).
- image: eu.gcr.io/kyma-project/example/http-db-service:0.0.6
imagePullPolicy: IfNotPresent
name: db-service
ports:
- name: http
containerPort: 8017
env:
- name: dbtype
# available dbtypes are: [memory, mssql]
value: "memory"