Can certifiactesResolvers be in dynamic configuration

Currently I have a working configuration with certifiactesResolvers section in static configuration file (traefik.yml) such as

certificatesResolvers:
  http-cr:
    acme:
      email: email@email.com
      storage: /letsencrypt/acme.json
      httpChallenge:
        entryPoint: http

Is it possible to have it in a dynamic configuration file ?

I have a working example with middlewares, but doesn't seem to work for certificatesResolvers

Hello,

certificatesResolvers is a part of the static configuration so it's not possible to define it in the dynamic configuration.

The uses of the certificatesResolvers are in the dynamic configuration https://docs.traefik.io/v2.0/routing/routers/#certresolver.

Hi @ldez,

Thanks that was indeed my conclusion. However would this be a reasonable feature request ?
It would be more convenient to have certificatesResolvers in dynamic config, especially the ones containing credentials.

The certificatesResolvers don't contain credentials because DNS provider credentials are define by using env vars.

I don't see the point to define certificatesResolvers in the dynamic configuration.

1 Like

@enys, just to elaborate a bit more on what Ludovic said, and also re-iterate what you've already read in the documentation:

  • Static configuration is loaded once on traefik startup
  • Dynamic configuration is loaded from various providers, in real time, as changes get discovered.

certificatesResolvers do not really belong to any of the providers, e.g. kuberntes can tell you nothing about certificate resolvers it is simply unaware of it, so it is not clear what benefit would it bring to make certificatesResolvers part of dynamic configuration: as per current design, they do not belong there logically.

1 Like

You both have fixed my missunderstanding ! Thanks. Mainly on the env vars + _file prefix.
All done here, thanks again for the help.

1 Like