On totally geodesic foliations with bundle-like metric