-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.yaml
More file actions
117 lines (117 loc) · 2.57 KB
/
Copy pathdeployment.yaml
File metadata and controls
117 lines (117 loc) · 2.57 KB
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
110
111
112
113
114
115
116
117
apiVersion: apps/v1
kind: Deployment
metadata:
name: nfs-server
labels:
app: nfs-server
version: v1.0.2
spec:
replicas: 1
selector:
matchLabels:
app: nfs-server
template:
metadata:
labels:
app: nfs-server
version: v1.0.2
spec:
containers:
- name: nfs-server
image: boyroywax/nfs-server:1.0.2
securityContext:
privileged: true
env:
- name: SHARE_NAME
value: "shared-storage"
- name: CLIENT_CIDR
value: "10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
- name: NFS_OPTIONS
value: "rw,sync,no_subtree_check,no_root_squash,insecure"
ports:
- name: nfs
containerPort: 2049
protocol: TCP
- name: mountd
containerPort: 20048
protocol: TCP
- name: rpcbind
containerPort: 111
protocol: TCP
- name: rpcbind-udp
containerPort: 111
protocol: UDP
volumeMounts:
- name: data-storage
mountPath: /nfsshare/data
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
livenessProbe:
exec:
command:
- /bin/sh
- -c
- "rpcinfo -p localhost | grep -q nfs"
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
exec:
command:
- /bin/sh
- -c
- "showmount -e localhost"
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
startupProbe:
exec:
command:
- /bin/sh
- -c
- "showmount -e localhost"
initialDelaySeconds: 5
periodSeconds: 2
timeoutSeconds: 3
failureThreshold: 30
volumes:
- name: data-storage
emptyDir: {}
restartPolicy: Always
dnsPolicy: ClusterFirst
---
apiVersion: v1
kind: Service
metadata:
name: nfs-server
labels:
app: nfs-server
spec:
type: ClusterIP
selector:
app: nfs-server
ports:
- name: nfs
port: 2049
targetPort: 2049
protocol: TCP
- name: mountd
port: 20048
targetPort: 20048
protocol: TCP
- name: rpcbind-tcp
port: 111
targetPort: 111
protocol: TCP
- name: rpcbind-udp
port: 111
targetPort: 111
protocol: UDP