He rammed a police car and drove onto the Harbour bridge, crashing into several cars driven by members of the public before coming to a crashing stop at the top of the bridge.
The Harbour Bridge was closed for about 20 minutes while police checked the area, as they initially believed more than one person may have been involved.
Samau, who is heavily tattooed with a large tattoo across his hairline, stood in the dock calmly throughout the sentencing.
Lawyer Rebecca Keenan said Samau was "at a cross-roads" in his life.
"He realises now he needs to make a full go at rehabilitation if he is to get out of this life of offending," she said.
Judge Paul said Samau had a history of crime from 2002 onwards, with convictions for assaults on police officers, carrying imitation firearms and an addiction to methamphetamine.
Samau had written a latter to the judge explaining he understood the seriousness of the offending on the night of January 25. He indicated he wanted to be treated for drug addiction in prison and once he is released.
Judge Paul said firing the rifle and ramming the police car were the most serious elements of the night.
"It was good luck that no one was injured," he said.
"It must have been hugely frightening for that officer [in the rammed car]. I expect he went to work thinking he would go home to his family, and then met you and your car and was faced with the prospect that he would not be going home to his family."
Judge Paul said the appropriate sentence was two and half years in prison.
Samau was also given a first strike warning for firing the gun, which counts as a violent offence.