You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't allow internal Services to share an LB (#2190)
Feature of sharing LBs seems to have some logic flaws. One of them is
the problem of mixing internal and external Services on a single LB. As
a FIP is tied to the LB and not individual listener, it means that if
one Service attached the FIP to the Service, all the other Services will
be available on that FIP. This may lead to accidental exposure of an
internal Service which can potentially be pretty bad.
This commits attempts to limit the number of cases when the user can
shoot themselves in the foot and makes it impossible for the internal
Services to be secondary on a share load balancer. Moreover a condition
is added that prevents secondary Services to create FIPs at all, so that
accidental exposure of primary internal service by a secondary external
one is solved.
There is no other way to reliably do that prevention as we only save
truncated name into the tags of the LB, so there's no way to get list of
all Services in a load balancer without listing all of them (in every
namespace) and looking through their LB ID annotation. Even with that
it's still really complicated to make decisions.
Cases (P - primary, S - secondary, E - external, I - internal):
P S
E E - all good
E I - prevented, all good
I I - prevented, not great, because it's technically a working
combination, but it's a cost
I E - external one won't create FIP, good
Updates (after #2168 merges):
E E -> E I - we'll get error on the second Service, good
E E -> I E - FIP gets detached, E won't be able to readd it, good.
0 commit comments