Confidentiality v. Privilege
Make sure you know the difference between your duty of confidentiality to a client and privileged information.
The duty of confidentiality is broader and is the most stringent in CA. You must maintain inviolate the confidence, and at every peril to yourself to preserve the secrets, of your client (this includes information that is or could be embarrassing or detrimental to the client.) This duty applies to all information "relating to representation" regardless of where you found that information, even if your client didn't ask you to keep it confidential.
Attorney-client privilege is an evidentiary testimonial issue narrowed to the communications between the attorney and the client (or agents thereof). It only protects communications pertaining to legal services (in CA it attaches to the entire confidential communication). The privilege survives death of the client.
So what are some situations when either of these can be broken or don't apply?
Confidences MAY be disclosed if a client gives informed consent to disclose in order to carry out representation, to prevent reasonably certain death or bodily harm, or to prevent a crime or fraud that is likely to cause substantial financial loss to a person where the client has used the lawyer to commit that fraud. In short, you may disclose if (1) consent, (2) certain death, or (3) crime fraud.
Revealing confidences could be required in some situations too. Some examples are in a lawsuit between attorney and client so that attorney can defend himself, in order to obtain legal ethics advice...
Attorney-client privilege similarly won't apply when the client seeks the attorney's advice to commit a future crime or fraud and the same "certain death" exception above. Similarly, in civil litigation cases where the attorney becomes a party. The privilege also wont apply when the attorney is needed to establish the competency or intention of a client who was attempting to create a Will.