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

Default template for kubernetes configuration backend doesn't provide entrypoints #1450

Closed
andrexus opened this issue Apr 17, 2017 · 1 comment

Comments

@andrexus
Copy link

andrexus commented Apr 17, 2017

What version of Traefik are you using (traefik version)?

v1.2.3 / morbier

What is your environment & configuration (arguments, toml...)?

defaultEntryPoints = ["http","https"]
[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

# Kubernetes configuration backend
[kubernetes]

# Consul catalog configuration backend
[consulCatalog]
endpoint = "10.1.0.101:8500"
domain = "xxx"

# Letsencrypt config
[acme]
email = "xxx"
storage = "/etc/traefik/acme.json"
entryPoint = "https"
...

What did you do?

Configured 2 configuration backends:

  • consulCatalog
  • kubernetes

What did you expect to see?

both configuration backends have entrypoints

What did you see instead?

only consulCatalog has entrypoints


All default templates besides kubernetes.tmpl declare entrypoints configuration. Having multiple configuration backends with ACME leads to the situation where kubernetes frontends don't have any entrypoint.
Providing custom templates as a workaround fixes the issue.

[kubernetes]
filename = "/etc/traefik/kubernetes_custom.tmpl"
[frontends]{{range $frontendName, $frontend := .Frontends}}
  [frontends."{{$frontendName}}"]
  backend = "{{$frontend.Backend}}"
  priority = {{$frontend.Priority}}
  passHostHeader = {{$frontend.PassHostHeader}}
    entrypoints = ["http", "https"] {{/* !!! Workaround !!! */}}
    {{range $routeName, $route := $frontend.Routes}}
    [frontends."{{$frontendName}}".routes."{{$routeName}}"]
    rule = "{{$route.Rule}}"
    {{end}}
{{end}}
@ldez ldez added area/provider/consul kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. labels Jun 13, 2017
@ldez ldez added kind/bug/confirmed a confirmed bug (reproducible). and removed kind/bug/possible a possible bug that needs analysis before it is confirmed or fixed. labels Dec 20, 2017
@traefiker
Copy link
Contributor

Closed by #2594.

@traefiker traefiker added this to the 1.5 milestone Dec 20, 2017
@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
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

3 participants