From 9c5328845c774bb19afbc199368509bac099829f Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Sun, 16 Apr 2023 19:50:03 -0400 Subject: [PATCH] Create local path provisioner config --- cluster/core/kube-system/kustomization.yaml | 4 +++ .../core/kube-system/local-path-config.yaml | 32 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 cluster/core/kube-system/kustomization.yaml create mode 100644 cluster/core/kube-system/local-path-config.yaml diff --git a/cluster/core/kube-system/kustomization.yaml b/cluster/core/kube-system/kustomization.yaml new file mode 100644 index 0000000..f2b0e0c --- /dev/null +++ b/cluster/core/kube-system/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./local-path-config.yaml \ No newline at end of file diff --git a/cluster/core/kube-system/local-path-config.yaml b/cluster/core/kube-system/local-path-config.yaml new file mode 100644 index 0000000..032e6b5 --- /dev/null +++ b/cluster/core/kube-system/local-path-config.yaml @@ -0,0 +1,32 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + name: local-path-config + namespace: kube-system +data: + config.json: |- + { + "nodePathMap":[ + { + "node":"DEFAULT_PATH_FOR_NON_LISTED_NODES", + "paths":[ "/mnt/MainPool/Kubernetes/local-path-provisioner" ] + }, + ] + } + setup: |- + #!/bin/sh + set -eu + mkdir -m 0777 -p "$VOL_DIR" + teardown: |- + #!/bin/sh + set -eu + rm -rf "$VOL_DIR" + helperPod.yaml: |- + apiVersion: v1 + kind: Pod + metadata: + name: helper-pod + spec: + containers: + - name: helper-pod + image: busybox \ No newline at end of file