diff --git a/files/local/local-path-config-ConfigMap.yaml b/files/local/local-path-config-ConfigMap.yaml index 6537b8f..ba4a2d0 100644 --- a/files/local/local-path-config-ConfigMap.yaml +++ b/files/local/local-path-config-ConfigMap.yaml @@ -15,10 +15,48 @@ data: } setup: |- #!/bin/sh - path=$1 - mkdir -m 0777 -p ${path} + 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} teardown: |- #!/bin/sh - path=$1 - rm -rf ${path} + while getopts "m:s:p:" opt + do + case $opt in + p) + absolutePath=$OPTARG + ;; + s) + sizeInBytes=$OPTARG + ;; + m) + volMode=$OPTARG + ;; + esac + done + + rm -rf ${absolutePath} + helperPod.yaml: |- + apiVersion: v1 + kind: Pod + metadata: + name: helper-pod + spec: + containers: + - name: helper-pod + image: busybox + diff --git a/files/local/local-path-provisioner-Deployment.yaml b/files/local/local-path-provisioner-Deployment.yaml index ebbcec7..9643055 100644 --- a/files/local/local-path-provisioner-Deployment.yaml +++ b/files/local/local-path-provisioner-Deployment.yaml @@ -16,7 +16,7 @@ spec: serviceAccountName: local-path-provisioner-service-account containers: - name: local-path-provisioner - image: rancher/local-path-provisioner:v0.0.17 + image: rancher/local-path-provisioner:v0.0.18 imagePullPolicy: IfNotPresent command: - local-path-provisioner diff --git a/files/local/local-path-provisioner-role-ClusterRole.yaml b/files/local/local-path-provisioner-role-ClusterRole.yaml index e0d39d1..35f4e83 100644 --- a/files/local/local-path-provisioner-role-ClusterRole.yaml +++ b/files/local/local-path-provisioner-role-ClusterRole.yaml @@ -4,7 +4,7 @@ metadata: name: local-path-provisioner-role rules: - apiGroups: [""] - resources: ["nodes", "persistentvolumeclaims"] + resources: ["nodes", "persistentvolumeclaims", "configmaps"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["endpoints", "persistentvolumes", "pods"]