SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2. apiVersion: v1
  3. kind: PersistentVolume
  4. metadata:
  5.   # Can be anything, but has to be matched at line 47
  6.   # Also should avoid conflicts with existing PV names in the namespace
  7.   name: preprov-pv-cephfs-01
  8. spec:
  9.   accessModes:
  10.   - ReadWriteMany
  11.   capacity:
  12.     storage: 5Gi
  13.   csi:
  14.     driver: rook-ceph.cephfs.csi.ceph.com
  15.     nodeStageSecretRef:
  16.       name: rook-ceph-csi
  17.       namespace: rook-ceph
  18.     volumeAttributes:
  19.       clusterID: rook-ceph
  20.       fsName: myfs
  21.       # The key "staticVolume" states this is pre-provisioned
  22.       # NOTE: This was "preProvisionedVolume: "true"" in Ceph-CSI versions 1.0 and below
  23.       staticVolume: "true"
  24.       # Path of the PV on the CephFS filesystem
  25.       rootPath: /staticpvs/pv-1
  26.     # Can be anything, need not match PV name, or volumeName in PVC
  27.     # Retained as the same for simplicity and uniquness
  28.     volumeHandle: preprov-pv-cephfs-01
  29.   # Reclaim policy must be "retain" as,
  30.   # deletion of pre-provisioned volumes is not supported
  31.   persistentVolumeReclaimPolicy: Retain
  32.   volumeMode: Filesystem
  33.   claimRef:
  34.     # Name should match "claimName" in PVC claim section
  35.     name: csi-cephfs-pvc-preprov
  36.     namespace: default
  37. ---
  38. apiVersion: v1
  39. kind: PersistentVolumeClaim
  40. metadata:
  41.   name: csi-cephfs-pvc-preprov
  42. spec:
  43.   accessModes:
  44.     - ReadWriteMany
  45.   resources:
  46.     requests:
  47.       storage: 5Gi
  48.   volumeName: preprov-pv-cephfs-01
  49. ---
  50. apiVersion: v1
  51. kind: Pod
  52. metadata:
  53.   name: csicephfs-preprov-demo-pod
  54. spec:
  55.   containers:
  56.     - image: busybox
  57.       name: busybox
  58.       command:
  59.         - sleep
  60.         - "3600"
  61.       imagePullPolicy: IfNotPresent
  62.       volumeMounts:
  63.         - name: mypvc
  64.           mountPath: /mnt
  65.   volumes:
  66.     - name: mypvc
  67.       persistentVolumeClaim:
  68.         claimName: csi-cephfs-pvc-preprov
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top