public static List<V1Pod> filterPods(List<V1Pod> podList, Predicate<V1Pod> filter) {
        if (podList == null || podList.isEmpty() || filter == null) {
            return podList;
        }
        return podList.stream().filter(filter::test).collect(Collectors.toList());
    }
@param podList
@param filter predicate used for filtering
@return filtered pods
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/util/K8sPodUtil.java