recovery: load colocated kubeconfig on remote hosts

This commit is contained in:
Brad Stein 2026-04-06 01:05:18 -03:00
parent b7f6317fd2
commit 1e891de7e8

View File

@ -41,6 +41,11 @@ if [[ -z "${MODE}" || "${MODE}" == "-h" || "${MODE}" == "--help" ]]; then
fi
shift || true
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
if [[ -z "${KUBECONFIG:-}" && -f "${SCRIPT_DIR}/kubeconfig" ]]; then
export KUBECONFIG="${SCRIPT_DIR}/kubeconfig"
fi
if [[ "${MODE}" != "shutdown" && "${MODE}" != "startup" ]]; then
echo "Unknown mode: ${MODE}" >&2
usage