public static String getAggregatedStatusOfContainersForPod(V1Pod v1Pod) {
        if (v1Pod == null) {
            return null;
        }
        String initContainerAggStatus = validateAndGetInitContainerStatuses(
                v1Pod.getStatus().getInitContainerStatuses());
        if (initContainerAggStatus != null) {
            return initContainerAggStatus;
        }
        if(v1Pod.getMetadata().getDeletionTimestamp() != null){
            return PodStatus.TERMINATING.getStatus();
        }
        String containerAggStatus = validateAndGetContainerStatuses(v1Pod.getStatus().getContainerStatuses());
        return containerAggStatus != null ? containerAggStatus : v1Pod.getStatus().getPhase();
    }
Gets aggregate status from Init containers - empty if init containers are ready
If init container status not found gets aggregated status from containers
If containers status not found get pod level status
@param v1Pod
@return ServiceStatus from containers in pod
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/util/K8sPodUtil.java