forked from linuxacademy/cicd-pipeline-train-schedule-canary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train-schedule-kube.yml
48 lines (46 loc) · 882 Bytes
/
train-schedule-kube.yml
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
kind: Service
apiVersion: v1
metadata:
name: train-schedule-service
spec:
type: NodePort
selector:
app: train-schedule
ports:
- protocol: TCP
port: 8080
nodePort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: train-schedule-deployment
labels:
app: train-schedule
spec:
replicas: 2
selector:
matchLabels:
app: train-schedule
track: stable
template:
metadata:
labels:
app: train-schedule
track: stable
spec:
containers:
- name: train-schedule
image: $DOCKER_IMAGE_NAME:$BUILD_NUMBER
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 1
periodSeconds: 10
resources:
requests:
cpu: 200m