diff --git a/frontend/public/module/k8s/pods.ts b/frontend/public/module/k8s/pods.ts index b0d5b47cc56..183fa6ef2b6 100644 --- a/frontend/public/module/k8s/pods.ts +++ b/frontend/public/module/k8s/pods.ts @@ -235,10 +235,16 @@ export const podPhase = (pod: PodKind): PodPhase => { _.each(pod.status.initContainerStatuses, (container: ContainerStatus, i: number) => { const { terminated, waiting } = container.state; + const initContainerSpec = pod.spec.initContainers.find((c) => c.name === container.name); + if (terminated && terminated.exitCode === 0) { return true; } + if (initContainerSpec?.restartPolicy === 'Always' && container.started) { + return true; + } + initializing = true; if (terminated && terminated.reason) { phase = `Init:${terminated.reason}`; diff --git a/frontend/public/module/k8s/types.ts b/frontend/public/module/k8s/types.ts index 0e62fc53632..ca10c639cbf 100644 --- a/frontend/public/module/k8s/types.ts +++ b/frontend/public/module/k8s/types.ts @@ -245,6 +245,7 @@ export type ContainerStatus = { image: string; imageID: string; containerID?: string; + started?: boolean; }; export type PodCondition = {