mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Fail etcd migration script if env var are unset
This commit is contained in:
parent
63531e56c5
commit
3255898fba
@ -40,16 +40,16 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
if [ -z "${TARGET_STORAGE:-}" ]; then
|
if [ -z "${TARGET_STORAGE:-}" ]; then
|
||||||
echo "TARGET_STORAGE variable unset - skipping migration"
|
echo "TARGET_STORAGE variable unset - unexpected failure"
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -z "${TARGET_VERSION:-}" ]; then
|
if [ -z "${TARGET_VERSION:-}" ]; then
|
||||||
echo "TARGET_VERSION variable unset - skipping migration"
|
echo "TARGET_VERSION variable unset - unexpected failure"
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -z "${DATA_DIRECTORY:-}" ]; then
|
if [ -z "${DATA_DIRECTORY:-}" ]; then
|
||||||
echo "DATA_DIRECTORY variable unset - skipping migration"
|
echo "DATA_DIRECTORY variable unset - unexpected failure"
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${TARGET_STORAGE}" != "etcd2" -a "${TARGET_STORAGE}" != "etcd3" ]; then
|
if [ "${TARGET_STORAGE}" != "etcd2" -a "${TARGET_STORAGE}" != "etcd3" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user