Chris Brown found himself in a heap of controversy Friday after he dissed Kylie Jenner’s father, Caitlyn, who was formerly known as Bruce. The “Loyal” singer said Caitlyn was a “science project” people paid more attention to than rapper Akon, whose company will supply 600 million Africans with solar energy power.

The Instagram post quickly went viral and Brown, 26, ultimately apologized to Kylie Jenner, 17. “Chris did apologize to everyone involved,” a source told Hollywood Life. “Even [his best friend and Kylie’s boyfriend] Tyga. He just said, ‘I’m just going through a lot right now. My bad.' ”

Even though the IG post was mean-spirited, Tyga forgave his friend. “Tyga and Chris are like brothers and there’s nothing but love between them,” the insider added. “At the same time, Tyga told Chris this better not happen again. They left it at that. Everything is all beautiful and copacetic now.”

Brown didn’t say why he was in a bad place, but it could be because he got into a screaming match with on-again, off-again girlfriend Karrueche Tran Thursday night. He followed her to a nightclub and then wormed his way into her car. She kicked him out a short time later, but then rumor has it that he went to her house and a mega-fight ensued.

Since he hasn’t been able to woo Tran back, the singer is apparently jealous of Tyga’s relationship with Jenner. When the teen showed up to the set of their music video -- the men are working on a song, “Do It Again,” with Pia Mia -- Brown was envious, a source told Hollywood Life in a different story.

“Kylie showed up looking red hot to support Tyga. They were hugging and laughing and being themselves. She even brought him a pack of Starburst. Karrueche used to do little things like that for Chris just to spice up his day and show him that she loves him,” the source said. “Chris took a second and just stood there, watching Kylie and Tyga interact between takes.”

Follow me on Twitter @mariamzzarella