No, LA to SF cruise by non-American cruise line won't be allowed. You could be fined heavily if you decided to "self disembark" at SF as a final destination.
There are "cruise to nowhere" or "weekend getaway" itineraries which don't have any land days. Princess has one on May 15 from SF to YVR. I think NCL runs a few from NY occasionally. Disney Wonder has one from San Diego on May 15.