Skip to content

Commit 1e4d377

Browse files
committed
make helm template wait to use CF with exex timeout
Signed-off-by: reggie-k <[email protected]>
1 parent 3eb38ed commit 1e4d377

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

util/exec/exec.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,20 @@ func RunCommandExt(cmd *exec.Cmd, opts CmdOpts) (string, error) {
225225
timeoutBehavior = opts.TimeoutBehavior
226226
}
227227

228+
logCtx.Error("*************************************** HELM COMMAND STARTED ***************************************")
229+
228230
select {
229231
// noinspection ALL
230232
case <-timoutCh:
233+
logCtx.Error("*************************************** HELM TIMEOUT HAPPENED ***************************************")
231234
// send timeout signal
232235
_ = cmd.Process.Signal(timeoutBehavior.Signal)
233236
// wait on timeout signal and fallback to fatal timeout signal
234237
if timeoutBehavior.ShouldWait {
235238
select {
236239
case <-done:
237240
case <-fatalTimeoutCh:
241+
logCtx.Error("*************************************** HELM FATAL TIMEOUT HAPPENED ***************************************")
238242
// upgrades to SIGKILL if cmd does not respect SIGTERM
239243
_ = cmd.Process.Signal(fatalTimeoutBehaviour)
240244
// now original cmd should exit immediately after SIGKILL

0 commit comments

Comments
 (0)