Hello. I tried to find answers for thisin related post but i just can´t find it.
I created a local plugin and configured it this way:
traefik.toml
[experimental.localPlugins.myplugin]
moduleName = "test.com/traefik/myplugin"
.traefik.yml
displayName: Do some stuff
type: middleware
import: test.com/traefik/myplugin
summary:do a lot of nice stuffs
testData:
Headers:
Foo: Bar
I can see in the logs that the plugin is loaded:
Static configuration loaded {"global":{"checkNewVersion":true},"serversTransport":{"maxIdleConnsPerHost":200},"entryPoints":{"http":{"address":":80","transport":{"lifeCycle":{"graceTimeOut":"10s"},"respondingTimeouts":{"idleTimeout":"3m0s"}},"forwardedHeaders":{},"http":{},"udp":{"timeout":"3s"}},"traefik":{"address":":8080","transport":{"lifeCycle":{"graceTimeOut":"10s"},"respondingTimeouts":{"idleTimeout":"3m0s"}},"forwardedHeaders":{},"http":{},"udp":{"timeout":"3s"}}},"providers":{"providersThrottleDuration":"2s","docker":{"watch":true,"endpoint":"unix:///var/run/docker.sock","defaultRule":"Host(`{{ normalize .Name }}`)","exposedByDefault":true,"swarmModeRefreshSeconds":"15s"}},"api":{"insecure":true,"dashboard":true},"ping":{"entryPoint":"http","terminatingStatusCode":503},"log":{"level":"DEBUG","format":"common"},"accessLog":{"format":"json","filters":{},"fields":{"defaultMode":"keep","headers":{"defaultMode":"drop"}}},"pilot":{"dashboard":true}**,"experimental":{"localPlugins":{"myplugin":{"moduleName":"test.com/traefik/myplugin"}}}}
But when i try to use it like this:
traefik.http.routers.myrouter.middlewares="testplugin-myplugin"
or
traefik.http.routers.myrouter.middlewares="myplugin"
i get an error like:
middleware "testplugin-mypluginn@docker" does not exist
I´m using Traefik 2.5.2 docker image. I tried a few combinations of static and dynamic values without luck Am i missing some configuration?