aboutsummaryrefslogtreecommitdiff
path: root/zookeeper/bootstrap/pv.sh
blob: ade25c5fa74d53ad303ad69aef6fde15b062df31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

echo "Note that in for example GKE a PetSet will have PersistentVolume(s) and PersistentVolumeClaim(s) created for it automatically"

dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
path="$dir/data"
echo "Please enter a path where to store data during local testing: ($path)"
read newpath
[ -n "$newpath" ] && path=$newpath

cat $dir/bootstrap/pv-template.yml | sed "s|/tmp/k8s-data|$path|" | kubectl create -f -