Skip to content

Commit

Permalink
incorrect-pod-status-listpage
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyril Ajieh committed Sep 30, 2024
1 parent 9789f25 commit edbe571
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/public/module/k8s/pods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,13 @@ export const podPhase = (pod: PodKind): PodPhase => {
let phase = pod.status.phase || pod.status.reason;

_.each(pod.status.initContainerStatuses, (container: ContainerStatus, i: number) => {
const { terminated, waiting } = container.state;
const { terminated, waiting, running } = container.state;
if (terminated && terminated.exitCode === 0) {
return true;
}
if (running && running.startedAt) {
return true;
}

initializing = true;
if (terminated && terminated.reason) {
Expand Down
1 change: 1 addition & 0 deletions frontend/public/module/k8s/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ export type ContainerState = {
waiting?: ContainerStateValue;
running?: ContainerStateValue;
terminated?: ContainerStateValue;
ready?: boolean;
};

export type ContainerStatus = {
Expand Down

0 comments on commit edbe571

Please sign in to comment.