Using Traefik version 2.0.0-beta1, I'm attempting to enable the file provider. According to the documentation, we can write dynamic configuration in the main Traefik configuration file:
You can write these configuration elements:
At the end of the main Traefik configuration file (by default: traefik.toml / traefik.yml / traefik.yaml ).
We also see examples of enabling the file provider specifying none of its optional fields:
providers:
file: {}
When I try to do so in my main traefik.yaml file, Traefik fails immediately with the following message:
command traefik error: file cannot be a standalone element (type *file.Provider)
Is this an unintentional regression? Is the documentation wrong?
With the latest v2.0.0-beta1, you must separate the static configuration from the dynamic configuration.
For your configuration, it means that you must specify a providers.file.filename attribute (hence the error message you have that expects either a filename or directory attribute).
I agree with you on the documentation page not clear enough: would you be willing to improve it by contributing?
Figuring out which documentation pages pertain to what's true in version 2 has been difficult. Which page do you think should mention this restriction?
Hello @seh, as the version v2.0 is still worked on, the documentation is absolutely not complete and is evolving step by step. But it is really a hard work.
Would you be interested in proposing a contribution, as it's Open Source, any help from the community is appreciated