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

echo "Note that in for example GKE a StatefulSet 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 bootstrap/pv-template.yml | sed "s|/tmp/k8s-data|$path|" | kubectl create -f -