/
deployment.yml
69 lines (68 loc) · 1.58 KB
/
deployment.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
apiVersion: apps/v1
kind: Deployment
metadata:
name: restapi
spec:
replicas: 1
selector:
matchLabels:
app: restapi
template:
metadata:
labels:
app: restapi
spec:
containers:
- env:
- name: ALLOW_EMPTY_PASSWORD
value: "yes"
- name: MARIADB_HOST
value: restapi-mariadb
- name: MARIADB_PORT_NUMBER
value: "3306"
- name: MARIADB_ROOT_PASSWORD
valueFrom:
secretKeyRef:
key: pwd
name: restapi-secret
- name: MARIADB_USER
value: restapi
- name: MARIADB_PASSWORD
valueFrom:
secretKeyRef:
key: pwd
name: restapi-secret
- name: MARIADB_DATABASE
value: restapi
name: restapi
image: xiliangma/restapi:statefulset-test
imagePullPolicy: Always
ports:
- name: dev
containerPort: 8080
- name: prod
containerPort: 8088
- name: https
containerPort: 443
resources:
limits:
cpu: 1000m
memory: 1024Mi
requests:
cpu: 300m
memory: 256Mi
livenessProbe:
httpGet:
path: /swagger
port: 8080
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 3
failureThreshold: 3
volumeMounts:
- mountPath: /data/restapi
name: restapi-data
volumes:
- name: restapi-data
emptyDir: {}