1. Sterilize jars, and prepare lids.
2. While jars are boiling, combine first 3 ingredients and 1 1/2 cups water in a large stainless steel or enameled Dutch oven; bring to a boil, stirring to dissolve sugar and salt. Add sliced onion to vinegar mixture; reduce heat, and simmer 6 minutes, uncovered, or until onion just begins to soften.
3. Place 1/4 tsp. allspice, 1/4 tsp. mustard seeds, 1 bay leaf, 1 thyme sprig, and 1 chile pepper in each hot jar. Using tongs, transfer onion to hot jars, leaving 1/2-inch headspace. Cover onion with hot pickling liquid, leaving 1/2-inch headspace. Seal and process jars, processing 10 minutes.
4. Remove jars from water, and let stand, undisturbed, at room temperature 24 hours. To check seals, remove the bands, and press down on the center of each lid. If the lid doesn’t move, the jar is sealed. If the lid depresses and pops up again, the jar is not sealed. Store properly sealed jars in a cool, dark place up to 1 year. Refrigerate after opening.