NEW YORK—The chief of New York state’s pension fund said on Thursday that McDonald’s Corp., PepsiCo. and other companies with a large footprint in Russia “need to consider whether doing business in Russia is worth the risk during this extraordinarily volatile time.” Political pressure is building for companies to halt business in Russia because of its invasion of Ukraine. Some big companies have already said they will do so, including sneaker maker Nike and home furnishings firm IKEA. “Russia’s unprovoked invasion of Ukraine and its highly unpredictable foreign policy are a threat to the global economy,” New York State Comptroller Thomas DiNapoli, who oversees the state’s public pension fund, said in a statement. “We’re encouraging the companies we invest in to do a risk analysis and determine what is in the best interests of their company and their shareholders,” he said. McDonald’s—one of the first western brands to open in …