From 2f7f3a7c26f476f51053c36c0e66c55d55481a51 Mon Sep 17 00:00:00 2001 From: shkumari-px Date: Mon, 25 Sep 2023 17:10:27 +0000 Subject: [PATCH] PB-4396 Added code to capture pod's description and append it to stork Pb-4396 Added code to send Pod's describe output even if PodLog is being sent Pb-4396 Updated code to send Pod's describe output even if PodLog is being sent Pb-4396 Updated code to send Pod's describe output even if PodLog is being sent --- pkg/controllers/dataexport/reconcile.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/controllers/dataexport/reconcile.go b/pkg/controllers/dataexport/reconcile.go index 45e45e791..c7e2bca09 100644 --- a/pkg/controllers/dataexport/reconcile.go +++ b/pkg/controllers/dataexport/reconcile.go @@ -520,6 +520,13 @@ func appendPodLogToStork(jobName string, namespace string) { } for _, pod := range pods.Items { numLogLines := int64(50) + podDescribe, err := core.Instance().GetPodByName(pod.Name, pod.Namespace) + if err != nil { + logrus.Infof("Error fetching description of job-pod[%s] :%v", pod.Name, err) + } + logrus.Infof("start of job-pod [%s]'s description", pod.Name) + logrus.Infof("Describe %v", podDescribe) + logrus.Infof("end of job-pod [%s]'s description", pod.Name) podLog, err := core.Instance().GetPodLog(pod.Name, pod.Namespace, &corev1.PodLogOptions{TailLines: &numLogLines}) if err != nil { logrus.Infof("error fetching log of job-pod %s: %v", pod.Name, err)