Browse Source

sample pvc

pull/2/head
Nicolas Massé 9 years ago
parent
commit
f6a878994d
  1. 18
      setup/sample-claim.yaml
  2. 11
      setup/setup.sh

18
setup/sample-claim.yaml

@ -0,0 +1,18 @@
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"name": "pvc-test"
"annotations":
"volume.beta.kubernetes.io/storage-class": "hostpath-provisioner"
},
"spec": {
"accessModes": [ "ReadWriteOnce" ],
"resources": {
"requests": {
"storage": "5Gi"
},
"volumeName": "pv-test"
}
}
}

11
setup/setup.sh

@ -1,7 +1,14 @@
oc project default
oc create -f service-account.yaml
oc create -f roles.yaml
# oc adm policy add-scc-to-user hostmount-anyuid system:serviceaccount:test-provisioner:hostpath-provisioner
# oc adm policy add-cluster-role-to-user hostpath-provisioner-runner system:serviceaccount:test-provisioner:hostpath-provisioner
oc adm policy add-scc-to-user hostmount-anyuid -z hostpath-provisioner
oc adm policy add-cluster-role-to-user hostpath-provisioner -z hostpath-provisioner
mkdir /tmp/openshift
chmod 777 /tmp/openshift
chcon -Rt svirt_sandbox_file_t /tmp/openshift
oc create -f pod.yaml
oc create -f class.yaml
oc create -f sample-claim.yaml

Loading…
Cancel
Save