From d0a1723d0fb604396312495815230ff563454e35 Mon Sep 17 00:00:00 2001 From: Tobias Jungel <1773291+toanju@users.noreply.github.com> Date: Thu, 2 Jul 2026 17:18:54 +0200 Subject: [PATCH] Improve signal handling in GardenerNodeLifecycleController So far ending the signal deployment/pod took more time than necessary because the sleep command was not handling the TERM signal properly. This change modifies the command to handle the TERM signal and exit gracefully, allowing for a faster shutdown of the container. --- internal/controller/gardener_node_lifecycle_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controller/gardener_node_lifecycle_controller.go b/internal/controller/gardener_node_lifecycle_controller.go index 920daec..f470d5d 100644 --- a/internal/controller/gardener_node_lifecycle_controller.go +++ b/internal/controller/gardener_node_lifecycle_controller.go @@ -207,7 +207,7 @@ func (r *GardenerNodeLifecycleController) ensureSignallingDeployment(ctx context corev1ac.Container(). WithName("sleep"). WithImage("keppel.global.cloud.sap/ccloud-dockerhub-mirror/library/busybox:latest"). - WithCommand("sleep", "inf"). + WithCommand("sh", "-c", "trap 'exit 0' TERM; sleep infinity & wait"). WithStartupProbe(corev1ac.Probe(). WithExec(corev1ac.ExecAction().WithCommand(command)). WithInitialDelaySeconds(0).