Hi all 👋
Just adding a tip in here, in case it saves a couple of minutes for people wanted to use ZFS with this local-path-provisioner.
At least it will for me, when i forget it 😬
kind: ConfigMap
apiVersion: v1
metadata:
name: local-path-config
namespace: local-path-storage
data:
config.json: |-
{
"nodePathMap":[
{
"node":"DEFAULT_PATH_FOR_NON_LISTED_NODES",
"paths":["/tank/"]
}
]
}
setup: |-
#!/bin/sh
while getopts "m:s:p:" opt
do
case $opt in
p)
absolutePath=$OPTARG
;;
s)
sizeInBytes=$OPTARG
;;
m)
volMode=$OPTARG
;;
esac
done
#volMode=Filesystem
zfs create -o quota=${sizeInBytes} ${absolutePath:1}
teardown: |-
#!/bin/sh
while getopts "m:s:p:" opt
do
case $opt in
p)
absolutePath=$OPTARG
;;
s)
sizeInBytes=$OPTARG
;;
m)
volMode=$OPTARG
;;
esac
done
zfs destroy ${absolutePath:1}
helperPod.yaml: |-
apiVersion: v1
kind: Pod
metadata:
name: helper-pod
spec:
containers:
- name: helper-pod
image: srueg/zfs-utils
securityContext:
privileged: true
Hi all 👋
Just adding a tip in here, in case it saves a couple of minutes for people wanted to use ZFS with this local-path-provisioner.
At least it will for me, when i forget it 😬