From a78783cf7a5a9b4141b3e2c6ece1e1146c7ca97e Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 31 Mar 2023 23:10:57 +0200 Subject: [PATCH] try to improve the debug pod --- hack/start-debug-pod.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hack/start-debug-pod.sh b/hack/start-debug-pod.sh index 813d580..54f1347 100755 --- a/hack/start-debug-pod.sh +++ b/hack/start-debug-pod.sh @@ -60,6 +60,7 @@ EOF kubectl wait --for=condition=Ready pod/$DEBUG_POD_NAME -n $NAMESPACE # Open a shell inside the debug pod -kubectl exec -it $DEBUG_POD_NAME -n $NAMESPACE -- /bin/sh +kubectl exec -it $DEBUG_POD_NAME -n $NAMESPACE -- /bin/sh --stdin --tty -trap 'kubectl delete pod $DEBUG_POD_NAME -n $NAMESPACE' EXIT +# Delete the debug pod when the shell session ends +kubectl delete pod $DEBUG_POD_NAME -n $NAMESPACE