Change local-path-config

This commit is contained in:
SeanOMik 2023-04-16 20:08:21 -04:00
parent 9c5328845c
commit 37a9fed45b
Signed by: SeanOMik
GPG Key ID: 568F326C7EB33ACB
2 changed files with 56 additions and 24 deletions

View File

@ -5,28 +5,59 @@ metadata:
namespace: kube-system namespace: kube-system
data: data:
config.json: |- config.json: |-
{ {
"nodePathMap":[ "nodePathMap":[
{ {
"node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES",
"paths":[ "/mnt/MainPool/Kubernetes/local-path-provisioner" ] "paths":["/var/lib/rancher/k3s/storage"]
}, }
] {
} "node":"r720xd",
setup: |- "paths":["/mnt/MainPool/Kubernetes/local-path-provisioner"]
#!/bin/sh }
set -eu ]
mkdir -m 0777 -p "$VOL_DIR" }
teardown: |-
#!/bin/sh
set -eu
rm -rf "$VOL_DIR"
helperPod.yaml: |- helperPod.yaml: |-
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
name: helper-pod name: helper-pod
spec: spec:
containers: containers:
- name: helper-pod - name: helper-pod
image: busybox image: rancher/mirrored-library-busybox:1.34.1
setup: |-
#!/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}/..
teardown: |-
#!/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}

View File

@ -1,6 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ./kube-system
- ./helm-repositories.yaml - ./helm-repositories.yaml
- ./cert-manager - ./cert-manager
- ./networking - ./networking