k3s-cluster/kubernetes/main/core/kube-system/local-path-config.yaml

63 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2023-04-16 23:50:03 +00:00
kind: ConfigMap
apiVersion: v1
metadata:
name: local-path-config
namespace: kube-system
data:
config.json: |-
2023-04-17 00:08:21 +00:00
{
"nodePathMap":[
{
"node":"DEFAULT_PATH_FOR_NON_LISTED_NODES",
"paths":["/var/lib/rancher/k3s/storage"]
}
{
"node":"r720xd",
"paths":["/mnt/MainPool/Kubernetes/local-path-provisioner"]
}
]
}
helperPod.yaml: |-
apiVersion: v1
kind: Pod
metadata:
name: helper-pod
spec:
containers:
- name: helper-pod
image: rancher/mirrored-library-busybox:1.37.0
2023-04-16 23:50:03 +00:00
setup: |-
2023-04-17 00:08:21 +00:00
#!/bin/sh
while getopts "m:s:p:" opt
do
case $opt in
p)
absolutePath=$OPTARG
;;
s)
sizeInBytes=$OPTARG
;;
m)
volMode=$OPTARG
;;
esac
done
mkdir -m 0777 -p ${absolutePath}
chmod 701 ${absolutePath}/..
2023-04-16 23:50:03 +00:00
teardown: |-
2023-04-17 00:08:21 +00:00
#!/bin/sh
while getopts "m:s:p:" opt
do
case $opt in
p)
absolutePath=$OPTARG
;;
s)
sizeInBytes=$OPTARG
;;
m)
volMode=$OPTARG
;;
esac
done
rm -rf ${absolutePath}