mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 18:02:01 +00:00
hack/local-up-cluster.sh: Cleaup on SIGINT
Currently we only cleanup on exit. Let's trap SIGINT (ctrl-c) too, so we always cleanup everything. Otherwise if we ctrl-c is easy to leave something running, specially if we ctrl-c while the cleanup function is running. And when we leave something running and don't reused the certs ($REUSE_CERTS), that is the default, something is left running and it fails with weird ways as we can't auth with the new certs. Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
This commit is contained in:
parent
f99c351992
commit
5f568d51be
@ -1151,6 +1151,7 @@ echo "Using GO_OUT ${GO_OUT}"
|
||||
export KUBELET_CIDFILE=${TMP_DIR}/kubelet.cid
|
||||
if [[ "${ENABLE_DAEMON}" = false ]]; then
|
||||
trap cleanup EXIT
|
||||
trap cleanup INT
|
||||
fi
|
||||
|
||||
echo "Starting services now!"
|
||||
|
Loading…
Reference in New Issue
Block a user