From 5f568d51be081cc9592dfbdd064259b97a7513bb Mon Sep 17 00:00:00 2001 From: Rodrigo Campos Date: Wed, 8 Mar 2023 17:37:50 +0100 Subject: [PATCH] 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 --- hack/local-up-cluster.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 16e8ed9a1cf..33d3489561d 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -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!"