-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
local-pvc.yaml
109 lines (109 loc) · 2.25 KB
/
local-pvc.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
apiVersion: apps/v1
kind: Deployment
metadata:
name: ftp-server
namespace: ${SELENIUM_NAMESPACE}
spec:
replicas: 1
selector:
matchLabels:
app: ftp-server
template:
metadata:
labels:
app: ftp-server
spec:
containers:
- name: ftp-server
image: delfer/alpine-ftp-server:latest
env:
- name: USERS
value: "seluser|selenium.dev"
- name: MAX_PORT
value: "21005"
- name: TINI_SUBREAPER
value: "true"
volumeMounts:
- mountPath: /ftp/seluser
name: ftp-upload
subPath: seluser
command: ["/bin/sh", "-c", "/sbin/tini -- /bin/start_vsftpd.sh && tail -f /dev/null"]
volumes:
- name: ftp-upload
persistentVolumeClaim:
claimName: ${TEST_PV_CLAIM_NAME}
---
apiVersion: v1
kind: Service
metadata:
name: ftp-server
namespace: ${SELENIUM_NAMESPACE}
labels:
app: ftp-server
spec:
selector:
app: ftp-server
ports:
- protocol: TCP
name: ftp
port: 21
targetPort: 21
- protocol: TCP
name: ftp-data0
port: 21000
targetPort: 21000
- protocol: TCP
name: ftp-data1
port: 21001
targetPort: 21001
- protocol: TCP
name: ftp-data2
port: 21002
targetPort: 21002
- protocol: TCP
name: ftp-data3
port: 21003
targetPort: 21003
- protocol: TCP
name: ftp-data4
port: 21004
targetPort: 21004
- protocol: TCP
name: ftp-data5
port: 21005
targetPort: 21005
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ${TEST_PV_CLAIM_NAME}
namespace: ${SELENIUM_NAMESPACE}
labels:
app: ftp-server
spec:
accessModes:
- "ReadWriteOnce"
resources:
requests:
storage: "2Gi"
storageClassName: "standard"
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-local
labels:
app: ftp-server
spec:
accessModes:
- "ReadWriteOnce"
capacity:
storage: "2Gi"
claimRef:
name: ${TEST_PV_CLAIM_NAME}
namespace: ${SELENIUM_NAMESPACE}
hostPath:
path: "${HOST_PATH}"
type: DirectoryOrCreate
persistentVolumeReclaimPolicy: Retain
storageClassName: "standard"