Skip to content

Commit

Permalink
k8s: update getPodStatus logic for crons with native sidecars (#3209)
Browse files Browse the repository at this point in the history
<!--- 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.
-->
  • Loading branch information
scarlettperry authored Jan 10, 2025
1 parent 2dec293 commit 6079489
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/service/k8s/pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6079489

Please sign in to comment.