From d3888d239d71384897cc012665a373fac6bea824 Mon Sep 17 00:00:00 2001 From: David Eads Date: Thu, 25 Jan 2024 15:24:39 -0500 Subject: [PATCH] add FallbackToLogsOnError for easier debugging --- pkg/cli/admin/mustgather/mustgather.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/cli/admin/mustgather/mustgather.go b/pkg/cli/admin/mustgather/mustgather.go index e5342be02e..16564b95f7 100644 --- a/pkg/cli/admin/mustgather/mustgather.go +++ b/pkg/cli/admin/mustgather/mustgather.go @@ -984,6 +984,7 @@ func (o *MustGatherOptions) newPod(node, image string, hasMaster bool) *corev1.P }, }, }, + TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError, VolumeMounts: []corev1.VolumeMount{ { Name: "must-gather-output", @@ -993,10 +994,11 @@ func (o *MustGatherOptions) newPod(node, image string, hasMaster bool) *corev1.P }, }, { - Name: "copy", - Image: image, - ImagePullPolicy: corev1.PullIfNotPresent, - Command: []string{"/bin/bash", "-c", "trap : TERM INT; sleep infinity & wait"}, + Name: "copy", + Image: image, + ImagePullPolicy: corev1.PullIfNotPresent, + Command: []string{"/bin/bash", "-c", "trap : TERM INT; sleep infinity & wait"}, + TerminationMessagePolicy: corev1.TerminationMessageFallbackToLogsOnError, VolumeMounts: []corev1.VolumeMount{ { Name: "must-gather-output",