He may sitting on the sidelines, but Boston Mayor Martin J. Walsh has been quickly thrust in the middle of the unfolding “Top Chef” trial just as his re-election campaign is starting.

The extortion trial of four Teamsters has already shown that for a second time, indicted former tourism chief Kenneth Brissette — Walsh’s hand-picked choice for the post — allegedly threatened to withhold permits for a project because it wasn’t hiring union workers.

The first was for the Boston Calling music festival, and the alleged extortion plot to give jobs to union workers produced indictments against Brissette and another City Hall aide, Timothy Sullivan.

Now we know that Brissette pulled the same stunt for the “Top Chef” show, according to testimony in the first two days of the trial of four Teamsters’ workers charged with threatening show workers and host Padma Lakshmi while they were trying to film at a Milton restaurant.

The reason the show was in Milton was because Brissette allegedly warned two Boston restaurants there would be trouble if they accommodated the “Top Chef” crew. Brissette also allegedly pulled permits for the show, just like he did for Boston Calling.

The pattern is clear — projects that didn’t fall in line with the Walsh administration got punished.

Contrast the treatment of “Top Chef” and Boston Calling with the failed Grand Prix of Boston. Brissette and Walsh didn’t pull permits for the proposed IndyCar race — they pulled out the red carpet.

City Hall made sure the Grand Prix got favored treatment because it was Walsh’s idea.

One email from Brissette to other City Hall officials laid out “talking points” Walsh was supposed to deliver during a meeting with Grand Prix representatives and IndyCar chief Mark Miles.

“The team assembled in Boston is top notch and consists of two people that were instrumental in my campaign last year,” one talking point read, according to the Brissette email.

“We will work with the team to get licenses and permits done expeditiously. We know that things need to keep moving in order for this race to become viable to investors and sponsors.”

By the way, Walsh is still paying Brissette his full $102,000 salary while the aide is awaiting trial.

Walsh’s warm welcome to the IndyCar race didn’t even have to do with unions — it was more to give Walsh a political victory. He desperately needed the race to succeed after the crash and burn of his 2024 Olympics bid.

There’s a lot more testimony to come in the “Top Chef” trial, and it’s not going to get any better for Walsh.

In just the second day, the show exposed the Boston mayor as not exactly telling the truth when his office claimed he fully supported “Top Chef.” A “Top Chef” producer testified that Brissette told him the show’s decision not to use union workers was putting Walsh in an “uncomfortable” position.

Too bad Walsh himself isn’t on the witness stand.

Now that would be uncomfortable.