I did exactly that on my slide in truck camper. It has been working great for almost a year. I didn’t notice any reduction in mileage, which was pretty bad to start with.
Solar Panel Installation on Our Truck Camper. Squeezing it all in place with VHB Tape and Unistrut.