Place your cauliflower, bay leaves, and chilis / chili flakes into a sterilized jar(s).
Place your water, vinegar and the remaining spices in a pan over medium heat, until all salt and sugar is dissolved. Once simmering, remove from heat and pour over jars of cauliflower. If you still have room, you can add slices of onion to ensure the jars are packed.
Place a canning weight in the jar and seal. Leave in a cool, dark place for 5-7 days. Then refrigerate and enjoy.