public static Map<String, Set<String>> getServicePVCs(List<V1PersistentVolumeClaim> pvcList) {
		if (pvcList == null || pvcList.isEmpty()) {
			return null;
		}

		Map<String, Set<String>> servicePVCs = new HashMap<>();
		pvcList.stream().forEach(pvc -> {
			String serviceName = ResourceLabelUtil.getServiceName(pvc.getMetadata().getLabels());

			if (servicePVCs.get(serviceName) == null) {
				servicePVCs.put(serviceName, new HashSet<>());
			}
			servicePVCs.get(serviceName).add(pvc.getMetadata().getName());
		});

		return servicePVCs;
	}
Utility to get volume related information from resource
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/util/KubernetesVolumeUtil.java