-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnfs-server.yaml
81 lines (81 loc) · 1.97 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
77
78
79
80
81
{{ 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
{{ if .Values.deployments.nfs.server.affinity }}
affinity:
{{ toYaml .Values.deployments.nfs.server.affinity | indent 8 }}
{{ end }}
{{ if .Values.deployments.nfs.server.nodeSelector }}
nodeSelector:
{{ toYaml .Values.deployments.nfs.server.nodeSelector | indent 8 }}
{{ end }}
{{ if .Values.deployments.nfs.server.tolerations }}
tolerations:
{{ toYaml .Values.deployments.nfs.server.tolerations | indent 6 }}
{{ end }}
containers:
- name: nfs-server
image: {{ printf "%s:%s" .Values.deployments.nfs.server.image.repository .Values.deployments.nfs.server.image.tag }}
imagePullPolicy: {{ .Values.deployments.nfs.server.image.pullPolicy }}
env:
{{ toYaml .Values.deployments.nfs.server.env | indent 8 }}
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 }}