class DefaultTaskToPodConverter implements TaskToPodConverter {

    @VisibleForTesting
    V1ResourceRequirements buildV1ResourceRequirements(ContainerResources containerResources) {
        Map<String, Quantity> requests = new HashMap<>();
        Map<String, Quantity> limits = new HashMap<>();

        requests.put("cpu", new Quantity(String.valueOf(containerResources.getCpu())));
        limits.put("cpu", new Quantity(String.valueOf(containerResources.getCpu())));

        requests.put("nvidia.com/gpu", new Quantity(String.valueOf(containerResources.getGpu())));
        limits.put("nvidia.com/gpu", new Quantity(String.valueOf(containerResources.getGpu())));

        Quantity memory;
        Quantity disk;
        Quantity network;
        if (configuration.isBytePodResourceEnabled()) {
            memory = new Quantity(containerResources.getMemoryMB() + "Mi");
            disk = new Quantity(containerResources.getDiskMB() + "Mi");
            network = new Quantity(containerResources.getNetworkMbps() + "M");
        } else {
            memory = new Quantity(String.valueOf(containerResources.getMemoryMB()));
            disk = new Quantity(String.valueOf(containerResources.getDiskMB()));
            network = new Quantity(String.valueOf(containerResources.getNetworkMbps()));
        }

        requests.put("memory", memory);
        limits.put("memory", memory);

        requests.put("ephemeral-storage", disk);
        limits.put("ephemeral-storage", disk);

        requests.put("titus/network", network);
        limits.put("titus/network", network);

        return new V1ResourceRequirements().requests(requests).limits(limits);
    }

    @Inject public  DefaultTaskToPodConverter(DirectKubeConfiguration configuration,
                                     PodAffinityFactory podAffinityFactory,
                                     TaintTolerationFactory taintTolerationFactory,
                                     LogStorageInfo<Task> logStorageInfo);

}