Skip to content

Commit

Permalink
PB-4396 Added code to capture pod's description and append it to stork
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shkumari-px committed Sep 27, 2023
1 parent 41d953c commit 2f7f3a7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/controllers/dataexport/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2f7f3a7

Please sign in to comment.