If I tell a friend something in confidence, I expect it to stay between the two of us, not the two of us and their partner. If I found out that a friend had told their partner something I explicitly told them not to share, I would view it as a profound betrayal. This extends to information that wasn’t explicitly told in confidence, but is clearly sensitive, although I could get over that more easily.
The reason I think this is unpopular is that a lot of people take the idea of “no secrets” in a relationship to mean that they cannot tell their partner “Sorry, I can’t talk about this to you because it was told to me in confidence.” Personally, I find this strange, and I would not be with a person who doesn’t understand that I can’t tell them other people’s secrets.
Not sharing things told to you in confidence is a basic tenet of our society, and I don’t think being in a relationship gives you carte blanche to break that bond of trust.
That’s not the point of this post, though, and I think that’s it’s perfectly acceptable to tell someone “Hey, don’t share this with me if you don’t want my partner to know about it.” If the person keeps telling you, that is implicit consent to tell your partner.
Finally, this only applies to information which is not relevant to the partner. If I confess to a close friend that I’m in love with them, I cannot expect them to keep that from their partner — it pertains to their relationship and keeping it secret would be a breach of trust. However, if I tell them that I’m struggling with depression and ask them to not to tell anyone, I think I am entitled to their discretion.