traefik-kop icon indicating copy to clipboard operation
traefik-kop copied to clipboard

router tls entry missing: router.tls=true without resolver is ignored

Open mwacker-sms opened this issue 1 year ago • 3 comments

Hi, i am running traefik version v2.11 (current latest as of writing) in combination with the current traefik-kop version (v0.13.2). So far everything works right out of the box in my simple setup (one docker host with traefik, another one with traefik-kop) and the router configuration is updated on traeffic.

Since i am not using a certresolver but certificate files configured in my main traefik instance i have not configured a cert resolver. I observed a strange behaviour by moving one of my services from the traefik host (where it worked just fine) to the traefik-kop host where it lost the tls configuration.

The labels in use (minimal example):

[...]
ports: 
  - 123...
labels:
  traefik.enable: true
  traefik.http.routers.https_backend.rule: "Host(`hostname.example`) && PathPrefix(`/api`)"
  traefik.http.routers.https_backend.entrypoints: websecure
  traefik.http.routers.https_backend.tls: true
  traefik.http.routers.https_backend.service: service_backend
  traefik.http.services.service_backend.loadbalancer.server.port: 123
  traefik.http.services.service_backend.loadbalancer.server.scheme: https

In the Traefik-Dashboard the router was successfully created, but without any TLS configuration.

In Redis there was no key traefik/http/routers/https_backend/tls set. After i created the key manually with the value true according to the Traefic KV doc the TLS configuration of the router was set as expected.

Since at least i expected the behaviour of traefik-kop to respect the same label tag configuration as traefik itself and the above configuration example is working fine in traefic itself i guess this might be a bug in traefik-kop.

After some time i found a workaround by adding a default certresolver label (traefik.http.routers.https_backend.tls.certresolver:default) which at least worked with my configuration. But since this is not necessary on treafik i consider this behaviour as unexpected.

mwacker-sms avatar Mar 01 '24 17:03 mwacker-sms