forked from linuxacademy/cicd-pipeline-train-schedule-canary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train-schedule-kube-canary.yml
49 lines (47 loc) · 964 Bytes
/
train-schedule-kube-canary.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
49
kind: Service
apiVersion: v1
metadata:
name: train-schedule-service-canary
spec:
type: NodePort
selector:
app: train-schedule
track: canary
ports:
- protocol: TCP
port: 8080
nodePort: 8081
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: train-schedule-deployment-canary
labels:
app: train-schedule
spec:
replicas: $CANARY_REPLICAS
selector:
matchLabels:
app: train-schedule
track: canary
template:
metadata:
labels:
app: train-schedule
track: canary
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