Grate the bar of soap (Ivory is the only one I use) into the water.
Crush the cloves of garlic and add to the mix. You do not need to peel or chop them, just smash them. If you can't get a really large bulb, use two smaller ones (about 20 small cloves).
Add the jar of pepper flakes.
Bring the entire mess to a simmer, stirring occasionally. The soap should dissolve completely.
Turn the heat off, cover the pot, and let it sit for a week or so. You could probably get away with two or three days, but the longer, the better.
Strain through a fine mesh strainer and store the liquid in a jug. If the mixture has thickened, warm it a bit before you strain it. I use the water jug from step one for storage.
When you want to use it, pour 1/2 cup of the soap mixture into a 2 1/2 gallon sprayer. Add water to fill the sprayer, and spray your plants. Do not store any unused liquid in your sprayer- mix a fresh batch each time.
One gallon of this stuff usually lasts me one year. Respray after heavy rains, or every two to three weeks or so. More often may be needed when there is rapid fruit or leaf growth.