You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/06/06 07:13:49 UTC

[camel-k] 03/03: fix(ctrl): use builtin command kill

This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch release-1.12.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 3dbb5042e67c737a7c0ebaed8ad78f84767e803d
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Thu Apr 13 10:53:24 2023 +0200

    fix(ctrl): use builtin command kill
    
    The builder Pods may not have a /bin/kill command, but do have a builtin shell kill command available.
    
    Closes #4241
---
 pkg/controller/build/monitor_pod.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/controller/build/monitor_pod.go b/pkg/controller/build/monitor_pod.go
index 0cd4bb859..07d078258 100644
--- a/pkg/controller/build/monitor_pod.go
+++ b/pkg/controller/build/monitor_pod.go
@@ -215,7 +215,7 @@ func (action *monitorPodAction) sigterm(pod *corev1.Pod) error {
 
 		r.VersionedParams(&corev1.PodExecOptions{
 			Container: container.Name,
-			Command:   []string{"kill", "-SIGTERM", "1"},
+			Command:   []string{"/bin/bash", "-c", "kill -SIGTERM 1"},
 			Stdout:    true,
 			Stderr:    true,
 			TTY:       false,