Skip to content

Commit 6079489

Browse files
k8s: update getPodStatus logic for crons with native sidecars (#3209)
<!--- TITLE FORMAT: "component: short description", e.g. "k8s: add pod log reader" --> ### Description <!-- Describe your change below. --> <!-- Reference previous related pull requests below. --> <!-- [OPTIONAL] Include screenshots below for frontend changes. --> ### Testing Performed <!-- Describe how you tested this change below. --> ### GitHub Issue <!-- Link to any existing GitHub issues related to this PR. --> Fixes # ### TODOs <!-- Include any TODOs outstanding for the submission of this pull request below. --> <!-- Example: - [ ] This is an item on my TODO list. - [x] This is a completed item. -->
1 parent 2dec293 commit 6079489

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

backend/service/k8s/pods.go

+3
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ func getPodStatus(pod *corev1.Pod) string {
342342
case nativeSidecarContainer[container.Name] && container.Started != nil && *container.Started && container.Ready:
343343
// https://github.com/kubernetes/kubernetes/blob/66e34012255abf1bbd0956a712817dad77c69c41/pkg/printers/internalversion/printers.go#L908
344344
continue
345+
// the below is for completed cronjob after all containers exit correctly
346+
case nativeSidecarContainer[container.Name] && container.Started != nil && container.State.Terminated != nil:
347+
continue
345348
case container.State.Terminated != nil && container.State.Terminated.ExitCode == 0:
346349
continue
347350
case container.State.Terminated != nil:

0 commit comments

Comments
 (0)