forked from nodeshift-starters/devfile-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yaml
59 lines (59 loc) · 1.04 KB
/
deploy.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
kind: Deployment
apiVersion: apps/v1
metadata:
name: my-nodejs
spec:
replicas: 3
selector:
matchLabels:
app: nodejs-app
template:
metadata:
labels:
app: nodejs-app
spec:
containers:
- name: my-nodejs
image: nodejs-image:latest
ports:
- name: http
containerPort: 3001
protocol: TCP
resources:
limits:
memory: "1024Mi"
cpu: "500m"
readinessProbe:
httpGet:
path: '/ready'
port: 3001
livenessProbe:
httpGet:
path: '/live'
port: 3001
---
kind: Service
apiVersion: v1
metadata:
name: my-nodejs-svc
spec:
ports:
- name: http-3001
port: 3001
protocol: TCP
targetPort: 3001
selector:
app: nodejs-app
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
name: my-nodejs-route
spec:
to:
kind: Service
name: my-nodejs-svc
port:
targetPort: 3001
tls:
termination: edge