They'll find out eventually, won't they?
Try inviting them for a serious talk first, to prepare them, because serious talks are always bad news. Then tell them the condition you have, and then top it off with the approximate amount of time you have left.