public static ResourceKind getPodParent(TroubleshootingContext context) {

        if (context == null || context.getResourceInfos() == null) {
            return null;
        }
        List<TroubleshootingContext.ResourceInfo> resourceInfos = context.getResourceInfos()
                .getOrDefault(ResourceKind.STATEFUL_SET.getKind(), null);

        if (resourceInfos != null && !resourceInfos.isEmpty()) {
            return ResourceKind.STATEFUL_SET;
        }

        resourceInfos = context.getResourceInfos().getOrDefault(ResourceKind.DEPLOYMENT.getKind(), null);

        if (resourceInfos != null && !resourceInfos.isEmpty()) {
            return ResourceKind.DEPLOYMENT;
        }

        return null;
    }
Pod parent can be deployment or statefulset
Preference is given to statefulset if both are present

@param context
@return Pod parent kind
deployer/troubleshooting-integration/src/main/java/io/hyscale/troubleshooting/integration/util/ConditionUtil.java