Kroger announced that it would buy Giant Eagle for just under $1.7 billion, a signal of the grocer's urgency to boost its footprint.