Skip to content

Instantly share code, notes, and snippets.

@rafabene
Last active March 19, 2018 01:54
Show Gist options
  • Save rafabene/2889150740201851c4af95ed46b22ed1 to your computer and use it in GitHub Desktop.
Save rafabene/2889150740201851c4af95ed46b22ed1 to your computer and use it in GitHub Desktop.
$ for A in {01..50}; do mkdir -p /data/pv$A; chmod 777 /data/pv$A; chcon -Rt svirt_sandbox_file_t /data/pv$A; done
$ for A in {01..50}; do
cat <<EOF>> pv.yaml
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: "pv$A"
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Recycle
hostPath:
path: /data/pv$A
EOF
oc create -f pv.yaml; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment