-
Notifications
You must be signed in to change notification settings - Fork 497
/
PersistentVolume.yaml
37 lines (35 loc) · 868 Bytes
/
PersistentVolume.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
{{- if eq .Values.cluster.volumeType "persistentVolume" }}
{{- $volumeLocalPath := .Values.cluster.volumeLocalPath -}}
{{- range $i, $hostname := .Values.cluster.nodeHostnames }}
apiVersion: v1
kind: PersistentVolume
metadata:
name: easegress-pv-{{$i}}
spec:
capacity:
storage: 4Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
storageClassName: easegress-storage
local:
path: {{$volumeLocalPath}}
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- {{$hostname}}
---
{{ end }}
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: easegress-storage
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
{{- end }}