Plugin setup code for TOML format is invalid

Hello!

I am trying to understand Plugins and how to use them and have published my own Plugin.

When I follow the steps after clicking "Install Plugin" I get the following error after restarting traefik:

docker run --rm -v $(pwd)/traefik.toml:/etc/traefik/traefik.toml -v /var/run/docker.sock:/var/run/docker.sock -p 80:80 -p 8080:8080 traefik:2.3.1
2020/10/19 07:26:38 command traefik error: Near line 24 (last key parsed 'global'): expected '.' or ']' to end table name, but got '/' instead

The provided TOML I copied is invalid:

[pilot]
  token = "xxxx"
[experimental.plugins.github.com/kevingimbel/traefik-plugin-header]
  moduleName = "github.com/kevingimbel/traefik-plugin-header"
  version = "v0.1.2"

If I paste this code into TOML Lint I also get an error. I believe this is a bug but I don't know where to report Pilot bugs.

Hello,

Your problem is related to the dots inside the plugins name:

[experimental.plugins.github.com/kevingimbel/traefik-plugin-header]

I have to use a name without dots (and with without slash).

[pilot]
  token = "xxxx"
[experimental.plugins.traefik-plugin-header]
  moduleName = "github.com/kevingimbel/traefik-plugin-header"
  version = "v0.1.2"

We will fix the generated snippet.

The snippet is fixed.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.