-
Notifications
You must be signed in to change notification settings - Fork 6
/
hostpath.yml
50 lines (50 loc) · 1.1 KB
/
hostpath.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: restapi
spec:
replicas: 1
selector:
matchLabels:
app: restapi
template:
metadata:
labels:
app: restapi
tier: backend
track: stable
spec:
containers:
- name: restapi
image: xiliangma/restapi:latest
imagePullPolicy: IfNotPresent
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: /tmp/cache
name: test-volume # 通过指定名称关联存储
volumes:
- name: test-volume
hostPath:
path: /data/hostpath