traefik icon indicating copy to clipboard operation
traefik copied to clipboard

Change loglevel without changing static config file

Open sokoide opened this issue 1 year ago • 4 comments

Welcome!

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

What did you expect to see?

We'd like to change Traefik's loglevel from outside for a temporary troubleshooting purpose.

We can do this in a standalone environment for it.

  1. change log::level in the static config file e.g. from
log:
  level: INFO

to

log:
  level: DEBUG
  1. restart Traefik

When Traefik is running inside K8s with the static config in K8s configmap, we can do this.

  1. change log::level in the static config in the configmap
  2. restart the Traefik pod

However, if Flux is configured and we can't suspend it, the config change made by the step1 is restored and then pod is restarted by Flux.

This is a feature request to change log level from outside while keeping the original static config mainly for a temporary troubleshooting in K8s.

sokoide avatar Dec 15 '23 06:12 sokoide

Hi! This is implemented in https://github.com/traefik/traefik/pull/10301

sandy2008 avatar Dec 15 '23 07:12 sandy2008

Duplicate of #9947

ldez avatar Dec 15 '23 10:12 ldez

Duplicate of #9947

Hi! The purpose is actually little different :) Please take a look at our implementation as well. 🥇

sandy2008 avatar Dec 15 '23 13:12 sandy2008

@sandy2008 Thanks for opening the PR, but as discussed there, we don't think configuring this on the API is what we want. The security implications are just too high.

@sokoide I faced situation where this would have been very handy. I would love to know more about your use case and constraints. Wouldn't it be possible to just push your ConfigMap changes and let Flux sync it for you? Could you be more specific in describing your need and why restarting your Traefik is not enough for you?

jspdown avatar Dec 18 '23 15:12 jspdown

Hi! I'm Træfiker :robot: the bot in charge of tidying up the issues.I have to close this one because of its lack of activity :disappointed:Feel free to re-open it or join our Community Forum.

traefiker avatar Mar 19 '24 00:03 traefiker