in storage media upgrade prompt, provide config for using protobuf

This commit is contained in:
Dan Gillespie 2017-03-27 16:46:38 +01:00
parent 031dd569ac
commit d7a552c188

View File

@ -454,17 +454,20 @@ if [[ -z "${STORAGE_MEDIA_TYPE:-}" ]] && [[ "${STORAGE_BACKEND:-}" != "etcd2" ]]
echo "" echo ""
echo "ETCD2 DOES NOT SUPPORT PROTOBUF: If you wish to have to ability to downgrade to etcd2 later application/json must be used." echo "ETCD2 DOES NOT SUPPORT PROTOBUF: If you wish to have to ability to downgrade to etcd2 later application/json must be used."
echo "" echo ""
echo "It's HIGHLY recommended that etcd be backed up before this step!!"
echo ""
echo "To enable using json, before running this script set:" echo "To enable using json, before running this script set:"
echo "export STORAGE_MEDIA_TYPE=application/json" echo "export STORAGE_MEDIA_TYPE=application/json"
echo "" echo ""
echo "It's HIGHLY recommended that etcd be backed up before this step!!"
echo ""
if [ -t 0 ] && [ -t 1 ]; then if [ -t 0 ] && [ -t 1 ]; then
read -p "Would you like to continue with the new default, and lose the ability to downgrade to etcd2? [y/N] " confirm read -p "Would you like to continue with the new default, and lose the ability to downgrade to etcd2? [y/N] " confirm
if [[ "${confirm}" != "y" ]]; then if [[ "${confirm}" != "y" ]]; then
exit 1 exit 1
fi fi
else else
echo "To enable using protobuf, before running this script set:"
echo "export STORAGE_MEDIA_TYPE=application/vnd.kubernetes.protobuf"
echo ""
echo "STORAGE_MEDIA_TYPE must be specified when run non-interactively." >&2 echo "STORAGE_MEDIA_TYPE must be specified when run non-interactively." >&2
exit 1 exit 1
fi fi