SolarCity co-founder Peter Rive is leaving Tesla, according to a media report.