This commit is contained in:
parent
2be4c03df1
commit
f599c99ee8
3 changed files with 44 additions and 6 deletions
|
|
@ -15,10 +15,48 @@ data:
|
||||||
}
|
}
|
||||||
setup: |-
|
setup: |-
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
path=$1
|
while getopts "m:s:p:" opt
|
||||||
mkdir -m 0777 -p ${path}
|
do
|
||||||
|
case $opt in
|
||||||
|
p)
|
||||||
|
absolutePath=$OPTARG
|
||||||
|
;;
|
||||||
|
s)
|
||||||
|
sizeInBytes=$OPTARG
|
||||||
|
;;
|
||||||
|
m)
|
||||||
|
volMode=$OPTARG
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -m 0777 -p ${absolutePath}
|
||||||
teardown: |-
|
teardown: |-
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
path=$1
|
while getopts "m:s:p:" opt
|
||||||
rm -rf ${path}
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ spec:
|
||||||
serviceAccountName: local-path-provisioner-service-account
|
serviceAccountName: local-path-provisioner-service-account
|
||||||
containers:
|
containers:
|
||||||
- name: local-path-provisioner
|
- name: local-path-provisioner
|
||||||
image: rancher/local-path-provisioner:v0.0.17
|
image: rancher/local-path-provisioner:v0.0.18
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command:
|
command:
|
||||||
- local-path-provisioner
|
- local-path-provisioner
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ metadata:
|
||||||
name: local-path-provisioner-role
|
name: local-path-provisioner-role
|
||||||
rules:
|
rules:
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["nodes", "persistentvolumeclaims"]
|
resources: ["nodes", "persistentvolumeclaims", "configmaps"]
|
||||||
verbs: ["get", "list", "watch"]
|
verbs: ["get", "list", "watch"]
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["endpoints", "persistentvolumes", "pods"]
|
resources: ["endpoints", "persistentvolumes", "pods"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue