-
Notifications
You must be signed in to change notification settings - Fork 0
/
nfs-server.yaml
76 lines (76 loc) · 2.07 KB
/
nfs-server.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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nfs-server
spec:
serviceName: nfs-server-service
replicas: 1
selector:
matchLabels:
role: nfs-server
template:
metadata:
labels:
role: nfs-server
spec:
hostNetwork: true
containers:
- name: nfs-server
image: gcr.io/google_containers/volume-nfs:0.8
# resources:
# requests:
# cpu: 2
# memory: 8Gi
# limits:
# cpu: 2
# memory: 8Gi
ports:
- name: nfs
containerPort: 2049
- name: mountd
containerPort: 20048
- name: rpcbind
containerPort: 111
securityContext:
privileged: true
command: ["/bin/entrypoint.sh"]
args: ["azure-managed-disk", "ultra-disk", "premium2-disk", "emptydir", "nvme"]
volumeMounts:
- name: emptydir
mountPath: /exports/emptydir
- name: azure-managed-disk
mountPath: /exports/azure-managed-disk
- name: ultra-disk
mountPath: /exports/ultra-disk
- name: premium2-disk
mountPath: /exports/premium2-disk
# configmap
- name: nfs-config
mountPath: /bin/entrypoint.sh
readOnly: true
subPath: entrypoint.sh
- name: fio-config
mountPath: /configs
# various types of storage
volumes:
- name: azure-managed-disk
persistentVolumeClaim:
claimName: azure-managed-disk
- name: emptydir
emptyDir:
medium: Memory
sizeLimit: 1Gi
- name: ultra-disk
persistentVolumeClaim:
claimName: ultra-disk
- name: premium2-disk
persistentVolumeClaim:
claimName: premium2-disk
# configmap
- name: nfs-config
configMap:
defaultMode: 0700
name: cm-nfs-config
- name: fio-config
configMap:
name: cm-fio-config