traefik / mesh

Traefik Mesh - Simpler Service Mesh
https://traefik.io/traefik-mesh
Apache License 2.0
2.03k stars 141 forks source link

Implement more Middlewares to Maesh #374

Open SantoDE opened 4 years ago

SantoDE commented 4 years ago

Proposal

Currently, Maesh can only configure 3 different middlewares on the Maesh Pods (Traefik v2).

I think, more middlewares should become configurable:

Configuration should stay on the Service Ressouce, as its currently done via annotations on it.

Background

Support more Features of Traefik v2.

stereohorse commented 4 years ago

It would be nice to have request & response body logging middleware with configurable data masking. So maesh users could extract intercommunication logging code from services that are not specific to business code.

What do you think? Should it be here or in traefik repository? If it is even good idea?

jspdown commented 4 years ago

@stereohorse Thanks for your interest in Traefik Mesh. You are describing a valid use case which is currently not supported. However, this is possible on Traefik. The v2.3 as been released and give the ability to write plugins. Traefik Mesh is currently only relying on core middlewares so we can't provide support for the feature you are requesting right now.

jspdown commented 4 years ago

@SantoDE Adding more middleware sounds like a good idea but I'm worried about the structure of our annotations. The AddPrefix and StepPrefix order in which they are applied matters but since annotations are just stored in map[string]string we can't guarantee it. In contrast with what we do on Traefik, we are not giving names to how middleware neither we are refering these names in a specific order in another annotation.

So, if we add these middlewares, no specific order should be expected. Or we will have to drastically change their structure.