Why does Maesh need to be in its own namespace?

Curious why Maesh needs to live outside of the user's namespace? I'm naive when it comes to Kubernetes DNS resolution outside of routing applications, so let me know if I'm missing something fairly obvious.

Would love to use this in our multi-tenant cluster's namespace, and we still could if we need the second namespace, but this will slow down development.

Hello @cbrintnall,

The reason for this is that Maesh creates a shadow service in its own namespace to allow for the .maesh endpoints to be created.

Maesh also ignores its own namespace, and does not create endpoints for services in its namespace.

If you install Maesh in the user's namespace, then Maesh will ignore services created within, and that would probably not be what you intended.

Thanks for getting back to me.

Maesh also ignores its own namespace, and does not create endpoints for services in its namespace.

Maesh ignoring user services definitely doesn't sound like desirable behavior :slight_smile: Thanks for clarifying.

Follow up question, couldn't this be solved with labels or selectors? I'm assuming you're saying: Maesh creates its own services for .maesh endpoints. It then uses its own namespace to ignore these, since we know anything in that namespace is a .maesh endpoint.

Couldn't you instead label all these endpoints with something like type=maesh and from there ignore those services? Another method could be to label with with id=<uuid4>, and have maesh keep track of all endpoint IDs. Whenever generating the .maesh endpoint you could check the intersection of the set of IDs against the service you're currently looking at to verify you aren't touching a maesh service.

Hello @cbrintnall,

There were a few iterations of the DNS code, which used to rely on the actual Maesh namespace being present, but that code does not exist anymore.

You are correct, it should be possible! If you would like to see this feature, please open a feature request on (Issues · traefik/mesh · GitHub)!

Awesome, just wanted to check before I did. Thank you for taking your time to discuss this with me!

Heres the issue: https://github.com/containous/maesh/issues/253

1 Like