When I installed the Stedi LED headlight I cut out the back of the headlight shell to allow the heatsink to work.
I wanted to seal the top of the headlight shell to stop rain driving in to the back of the shell and wiring.
I put a layer of thin plastic tape on the headlight rim and rubbed a bit of car wax on it.
I set up the headlight at the right height and added a bead of Sika 291 on the bottom of the screen to the headlight rim.
I let it set overnight then took the screen off, pulled off the tape on the rim and I have a rubberised weather seal that is removable.
I've used this in other areas and it works well.[You must be registered and logged in to see this image.]