forked from maksim-paskal/hcloud-k8s-ctl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nfs-server.yaml
73 lines (73 loc) · 1.7 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
{{ if .Values.deployments.nfs.server.enabled }}
kind: Service
apiVersion: v1
metadata:
name: nfs-server
labels:
app: nfs-server
spec:
type: ClusterIP
clusterIP: {{ .Values.deployments.nfs.server.clusterIP }}
selector:
app: nfs-server
ports:
- name: tcp-2049
port: 2049
protocol: TCP
- name: udp-111
port: 111
protocol: UDP
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: nfs-server
spec:
serviceName: "nfs-server"
replicas: 1
selector:
matchLabels:
app: nfs-server
template:
metadata:
name: nfs-server
labels:
app: nfs-server
spec:
priorityClassName: system-cluster-critical
containers:
- name: nfs-server
# git clone [email protected]:sjiveson/nfs-server-alpine.git
# cd nfs-server-alpine
# remove --no-nfs-version 2 in nfsd.sh
# docker build . --platform=linux/amd64,linux/arm64 --pull --push -t paskalmaksim/nfs-server-alpine:$(date '+%Y%m%d')$(git rev-parse --short HEAD)
image: paskalmaksim/nfs-server-alpine:20231106ca320f7
env:
- name: SHARED_DIRECTORY
value: "/exports"
volumeMounts:
- mountPath: /exports
name: nfs-data
securityContext:
privileged: true
resources:
requests:
cpu: "50m"
memory: "300Mi"
readinessProbe:
exec:
command:
- showmount
- -e
- 127.0.0.1
initialDelaySeconds: 10
periodSeconds: 5
volumeClaimTemplates:
- metadata:
name: nfs-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 200Gi
{{ end }}