From 6ee1b03f9e83c1e129b45a6bc9292a99add6b36e Mon Sep 17 00:00:00 2001 From: Michael Weibel <307427+mweibel@users.noreply.github.com> Date: Thu, 24 Mar 2022 15:56:05 +0100 Subject: [PATCH] fix: do not panic when termination-log is not writeable (#8221) Signed-off-by: Michael Weibel --- util/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/util.go b/util/util.go index 5a1dbe2cf515..502cb1f7dc32 100644 --- a/util/util.go +++ b/util/util.go @@ -53,7 +53,7 @@ func GetSecrets(ctx context.Context, clientSet kubernetes.Interface, namespace, func WriteTerminateMessage(message string) { err := ioutil.WriteFile("/dev/termination-log", []byte(message), 0o600) if err != nil { - panic(err) + println("unable to write termination log: " + err.Error()) } }