Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment Variables #10759

Closed
2 tasks done
Ramalama2 opened this issue May 24, 2024 · 3 comments
Closed
2 tasks done

Environment Variables #10759

Ramalama2 opened this issue May 24, 2024 · 3 comments

Comments

@Ramalama2
Copy link

Welcome!

  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?

Setting up Environment Variables to Configure the "default-storage" Certificate resolver.

TRAEFIK_CERTIFICATESRESOLVERS_default-storage=true
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE=true
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE_DELAYBEFORECHECK=10
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE_PROVIDER=ovh
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE_RESOLVERS=ns12.ovh.net
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_EMAIL="edv@mydomain.de"

What did you see instead?

ERR Router uses a non-existent certificate resolver certificateResolver=default-storage routerName=api@file

What version of Traefik are you using?

Version: 3.0.1
Codename: beaufort
Go version: go1.22.3
Built: 2024-05-22T13:12:16Z
OS/Arch: linux/amd64

What is your environment & configuration?

[global]
  checkNewVersion = true
  sendAnonymousUsage = false

[entryPoints]
  [entryPoints.web]
    address = ":80"
    [entryPoints.web.http.redirections.entryPoint]
      to = "websecure"
      scheme = "https"

  [entryPoints.websecure]
    address = ":443"

[providers.docker]
  endpoint = "unix:///var/run/docker.sock"
  exposedByDefault = false
   watch = true
   network = "web"

[providers.file]
  directory = "traefik.d"
  watch = true

[log]
  level = "ERROR"

[api]
  dashboard = true

Environment Variables:
LEGO_DISABLE_CNAME_SUPPORT=true
OVH_ENDPOINT=ovh-eu
OVH_APPLICATION_KEY=xxxx
OVH_APPLICATION_SECRET=xxxxx
OVH_CONSUMER_KEY=xxxxxx
TRAEFIK_CERTIFICATESRESOLVERS_default-storage=true
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE=true
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE_DELAYBEFORECHECK=10
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE_PROVIDER=ovh
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE_RESOLVERS=ns12.ovh.net
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_EMAIL="edv@mydomain.de"

If applicable, please paste the log output in DEBUG level

No response

@Ramalama2
Copy link
Author

Its much easier without the Bugreport-Form, to tell what the issue is.

The documentation lacks a bit about the Environment Variables either, like how to add multiple dns resolver servers.
But anyway, to my eyes it looks like the environment config gets completely ignored.

TRAEFIK_CERTIFICATESRESOLVERS_default-storage=true
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE=true
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE_DELAYBEFORECHECK=10
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE_PROVIDER=ovh
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_DNSCHALLENGE_RESOLVERS=ns12.ovh.net
TRAEFIK_CERTIFICATESRESOLVERS_default-storage_ACME_EMAIL="edv@mydomain.de"

-->
ERR Router uses a non-existent certificate resolver certificateResolver=default-storage routerName=api@file

So the workaround: simply configure that resolver via toml, but why the document page lists that there are environment variables for that?

Thanks everyone, great work with Traefik :-)

@ldez
Copy link
Contributor

ldez commented May 24, 2024

Hello,

There are three different, mutually exclusive (i.e. you can use only one at the same time), ways to define static configuration options in Traefik

https://doc.traefik.io/traefik/getting-started/configuration-overview/#the-static-configuration

So you cannot use a file and env vars simultaneously.

@Ramalama2
Copy link
Author

Hello,

There are three different, mutually exclusive (i.e. you can use only one at the same time), ways to define static configuration options in Traefik

https://doc.traefik.io/traefik/getting-started/configuration-overview/#the-static-configuration

So you cannot use a file and env vars simultaneously.

Thank you a lot, sorry for the stupid bugreport!

@ldez ldez added kind/question a question and removed status/0-needs-triage labels May 24, 2024
@traefik traefik locked and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants