public static List<V1Pod> filterPods(List<V1Pod> podList, BiPredicate filter, Object filterValue) {
        if (podList == null || podList.isEmpty() || filter == null || filterValue == null) {
            return podList;
        }

        return podList.stream().filter(pod -> filter.test(pod, filterValue))
                .collect(Collectors.toList());
    }
@param podList
@param filter condition and value
@param filterValue - value used for filtering
@return
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/util/K8sPodUtil.java