58 lines
1.1 KiB
YAML
58 lines
1.1 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: zfile
|
||
|
labels:
|
||
|
app: zfile
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: zfile
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: zfile
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: zfile
|
||
|
image: 10.9.12.201/xingdian/zfile:v1
|
||
|
ports:
|
||
|
- containerPort: 8080
|
||
|
env:
|
||
|
- name: TZ
|
||
|
value: Asia/Shanghai
|
||
|
volumeMounts:
|
||
|
- mountPath: /root/.zfile-v4/db
|
||
|
name: zfile-db
|
||
|
- mountPath: /root/.zfile-v4/logs
|
||
|
name: zfile-logs
|
||
|
- mountPath: /data/file
|
||
|
name: file
|
||
|
volumes:
|
||
|
- name: zfile-db
|
||
|
nfs:
|
||
|
path: /data/zfile/db
|
||
|
server: 10.9.12.250
|
||
|
- name: zfile-logs
|
||
|
nfs:
|
||
|
path: /data/zfile/logs
|
||
|
server: 10.9.12.250
|
||
|
- name: file
|
||
|
nfs:
|
||
|
path: /data/zfile/file
|
||
|
server: 10.9.12.250
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: zfile-service
|
||
|
spec:
|
||
|
selector:
|
||
|
app: zfile
|
||
|
type: NodePort
|
||
|
ports:
|
||
|
- port: 8080
|
||
|
targetPort: 8080
|
||
|
nodePort: 30120
|