While Judaism has historically been quite firm on embracing both human free will and divine omniscience, there has actually been very little agreement amongst Jewish authorities about precisely how to reconcile those two ideas. Or, really, about any questions....
Of the various answers that have been proposed, the one that I feel is most compelling is that omniscience is a description of capability, not a description of choice. In other words, God is capable of knowing all, but God chooses not to know certain things-- those things being the actions resulting from human free will. I think of it as sort of the ultimate, supernal version of willing suspension of disbelief as we experience it when watching a play or a movie.
One of my best friends, who also likes this answer, says he envisions it as God having access to the full spectrum of potential outcomes of all choices: like seeing a massive flowchart of quantum realities splitting off of each minute possible choice or act that occurs in the universe. But God chooses to "hide" from Himself which of these outcomes will become the "dominant" track of our reality until after the choices have been made. I don't know if I envision it precisely in that way, but it's an interesting idea, I think.
I am aware, of course, that this answer is, in its way, just as flawed as any other answer. But my guess is that the true reconciliation of these things is a mystery unlikely to be solved while we exist on this plane of being. So for me, I am satisfied picking the answer that gets me through the night, so to speak.
As for randomness, I think random natural events are random within the created universe, but I tend to believe that God is capable of seeing pattern in them, or simply chooses to be aware of their outcomes. I think the self-contraction of His omniscience is essentially the supernal form of the gift of free will, but doesn't extend past human free will.