From 607948907698b6cd83adf628be0d28737a558bba Mon Sep 17 00:00:00 2001 From: Scarlett Perry <39421794+scarlettperry@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:24:41 -0500 Subject: [PATCH] k8s: update getPodStatus logic for crons with native sidecars (#3209) ### Description ### Testing Performed ### GitHub Issue Fixes # ### TODOs --- backend/service/k8s/pods.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/service/k8s/pods.go b/backend/service/k8s/pods.go index 1060e0be03..779818ef09 100644 --- a/backend/service/k8s/pods.go +++ b/backend/service/k8s/pods.go @@ -342,6 +342,9 @@ func getPodStatus(pod *corev1.Pod) string { case nativeSidecarContainer[container.Name] && container.Started != nil && *container.Started && container.Ready: // https://github.com/kubernetes/kubernetes/blob/66e34012255abf1bbd0956a712817dad77c69c41/pkg/printers/internalversion/printers.go#L908 continue + // the below is for completed cronjob after all containers exit correctly + case nativeSidecarContainer[container.Name] && container.Started != nil && container.State.Terminated != nil: + continue case container.State.Terminated != nil && container.State.Terminated.ExitCode == 0: continue case container.State.Terminated != nil: