public int getDesiredReplicas(ScaleOperation scaleOp, int scaleValue, int currentReplicas) throws HyscaleException {
        int desiredReplicas = currentReplicas;
        switch (scaleOp) {
            case SCALE_TO:
                desiredReplicas = scaleValue;
                break;
            case SCALE_UP:
                desiredReplicas = currentReplicas + scaleValue;
                break;
            case SCALE_DOWN:
                if (scaleValue == 0) {
                    throw new HyscaleException(DeployerErrorCodes.CANNOT_SCALE_DOWN_ZERO, String.valueOf(scaleValue));
                }
                if (currentReplicas > 0) {
                    desiredReplicas = currentReplicas - scaleValue;
                }
                break;
            default:
                logger.debug("Scale op not supported: {}", scaleOp);
        }
        desiredReplicas = desiredReplicas < 0 ? 0 : desiredReplicas;
        logger.debug("Preparing the scale patch , desired replicas {} ", desiredReplicas);

        return desiredReplicas;
    }
Get all resources irrespective of namespace
@param apiClient
@param selector
@param label
@return List of resource
@throws HyscaleException
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/handler/PodParentHandler.java