New York’s private-sector service unions have been going gangbusters — inking two great deals for their workers in two months. Congrats to them. The danger for New York is that public-sector unions will point to these agreements in their own negotiations.

The latest deal came last week, with the Service Employees International Union winning raises for 10,000 private-security officers who staff such buildings as Rockefeller Center and the Bank of America tower. The guards — nine of whom died on 9/11 — will get 3 percent annual raises over four years, bringing the average up to $19 hourly, or almost $40,000 a year, plus better vacations and benefits.

The guard pact follows one that the New York Hotel Trades Council, part of the AFL-CIO, hammered out in February for 21,000 hotel housekeepers, dishwashers and waiters. The 7-year deal calls for 3.7 percent annual raises; these workers will get benefits improvements, too. By the end of the contract, housekeepers will earn $33 an hour, or nearly $69,000 a year.

Meanwhile, city agreements with public-sector workers, from teachers to civilians, are up for renewal. The state’s biggest downstate union, the Transport Workers Union, also saw its last three-year deal expire in January.

Gov. Cuomo and Mayor Bloomberg say that state and city government can’t afford raises, unless workers “pay” for such raises through better work rules.

But look for union leaders to use the private deals as leverage — arguing that if hotel maids deserve huge raises, then so do the folk who keep New York moving.

In the TWU’s case, there’s a risk that if union leader John Samuelson and MTA chief Joe Lhota reach an impasse and go to mandatory arbitration, union leaders could make this argument successfully to arbitrators. Cuomo would be able to say that he didn’t have a choice in the matter.

The comparison doesn’t hold up, though.

First is the difference between two parts of the city’s economy — the part that is made up of the global 1 percent and the city as a whole.

Hotels are doing well because the world’s elite are doing well. Packs of young Chinese and Russian tourists, for example, are crowding to New York to buy luxury shoes and clothes.

Class-A office towers are doing well because the financial industry (although its prospects are shaky) has weathered the recession and recovery better than most fields.

In both cases, wage growth may fall if the industries face tougher times.

But although New York benefits from the taxes that elites pay, the elites don’t pay all the taxes. Any labor deals built on the 1 percent will end up costing middle-class taxpayers, especially if the fortunes of the 1 percent change.

Second is the difference in pension packages between private workers and public. Hotel housekeepers and private-security guards are happy with their deals — but they don’t have it as good as the public sector.

Hotel workers, for example, have traditional pensions — but they’re nowhere near as generous as government pensions. These workers can’t retire with full benefits until 65, after 25 years of work. The maximum pension benefit is $1,300 monthly for hotel workers; guards make about the same. That’s why they supplement their pensions with 401(k)s.

Even after Cuomo’s pension reforms, New York state civilian workers will be able to retire at 63, and TWU workers can still retire at 55. Uniformed New York City employees can still retire after 20 years. Workers can also still pad their pensions with overtime — with uniformed city workers facing no limit to this padding.

Yet there’s one part of the private sector that public unions don’t want to emulate: old-line industries, such as airlines. Last month, the Transport Workers Union members who work for American Airlines lost guaranteed pensions for future years of service.

The TWU’s “victory” was that American agreed to preserve the pension credits that workers have earned for past service, rather than terminate them in bankruptcy and send them to a government body that would reduce them.

TWU International President James Little said, “We would have preferred to keep the . . .defined-benefit plan, but that simply was not possible.”

Unless New York’s politicos are realistic with their unions, they, too, will find that they’ve made promises they can’t keep. In that sense, New York’s public pensions may look more like unionized American Airlines workers’ plans than like hotel housekeepers’.

Nicole Gelinas is a contributing editor to the Manhattan Institute’s City Journal.