Skip to content

Commit fe9834f

Browse files
Add soft link to make a persistent volume available for hostPath mount (brunsgaard#4)
1 parent b71d90b commit fe9834f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

eks-nvme-ssd-provisioner.sh

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ esac
4949
UUID=$(blkid -s UUID -o value $DEVICE)
5050
mkdir -p /pv-disks/$UUID
5151
mount -o defaults,noatime,discard,nobarrier --uuid $UUID /pv-disks/$UUID
52+
ln -s /pv-disks/$UUID /nvme/disk
5253
echo "Device $DEVICE has been mounted to /pv-disks/$UUID"
5354
echo "NVMe SSD provisioning is done and I will go to sleep now"
5455

manifests/eks-nvme-ssd-provisioner.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ spec:
2828
- mountPath: /pv-disks
2929
name: pv-disks
3030
mountPropagation: "Bidirectional"
31+
- mountPath: /nvme
32+
name: nvme
33+
mountPropagation: "Bidirectional"
3134
volumes:
3235
- name: pv-disks
3336
hostPath:
3437
path: /pv-disks
38+
- name: nvme
39+
hostPath:
40+
path: /nvme

0 commit comments

Comments
 (0)