truecharts / charts

Community Helm Chart Repository
https://truecharts.org
GNU Affero General Public License v3.0
1.13k stars 622 forks source link

[BUG/REQUEST] Support for more advanced control of Traefik #2594

Closed packruler closed 2 years ago

packruler commented 2 years ago

App Name

Traefik

SCALE Version

22.02.0

App Version

2.6.3_11.1.8

Application Events

2022-05-01 7:42:57
Stopping container traefik
2022-05-01 7:42:57
Deleted pod: traefik-7f556ff97f-x4bn9
2022-05-01 7:42:57
Scaled down replica set traefik-7f556ff97f to 0
2022-05-01 7:42:38
Started container traefik
2022-05-01 7:42:38
Created container traefik
2022-05-01 7:42:36
Container image "tccr.io/truecharts/traefik:v2.6.3@sha256:77435c7025716579a75484eb76b269376d5072847a85cebd08408cc43dda7e5c" already present on machine
2022-05-01 7:42:35
Started container hostpatch
2022-05-01 7:42:34
Created container hostpatch
2022-05-01 7:42:32
Container image "ghcr.io/truecharts/alpine:v3.15.2@sha256:29ed3480a0ee43f7af681fed5d4fc215516abf1c41eade6938b26d8c9c2c7583" already present on machine
2022-05-01 7:42:32
Started container autopermissions
2022-05-01 7:42:32
Created container autopermissions
2022-05-01 7:42:29
Container image "ghcr.io/truecharts/alpine:v3.15.2@sha256:29ed3480a0ee43f7af681fed5d4fc215516abf1c41eade6938b26d8c9c2c7583" already present on machine
2022-05-01 7:42:29
Add eth0 [172.16.66.71/16] from ix-net
Successfully assigned ix-traefik/traefik-6867667bb6-f4crc to ix-truenas
2022-05-01 7:42:27
Created pod: traefik-6867667bb6-f4crc
2022-05-01 7:42:27
Scaled up replica set traefik-6867667bb6 to 1

Application Logs

* This is from running `k3s kubectl describe pods/traefik-7d676d5d69-vlpwt -n ix-traefik`

 console
...
Containers:
  traefik:
    Container ID:  docker://10a5c18f9980fc2e70554fce229486d25269d2560890f004c05f422d443c944f
    Image:         tccr.io/truecharts/traefik:v2.6.3@sha256:77435c7025716579a75484eb76b269376d5072847a85cebd08408cc43dda7e5c
    Image ID:      docker-pullable://tccr.io/truecharts/traefik@sha256:77435c7025716579a75484eb76b269376d5072847a85cebd08408cc43dda7e5c
    Ports:         9000/TCP, 9180/TCP, 80/TCP, 443/TCP
    Host Ports:    0/TCP, 0/TCP, 0/TCP, 0/TCP
    Args:
      --global.checknewversion
      --entryPoints.main.address=:9000/tcp
      --entryPoints.metrics.address=:9180/tcp
      --entryPoints.web.address=:80/tcp
      --entryPoints.websecure.address=:443/tcp
      --api.dashboard=true
      --ping=true
      --metrics.prometheus=true
      --metrics.prometheus.entrypoint=metrics
      --providers.kubernetescrd
      --providers.kubernetesingress
      --providers.kubernetesingress.ingressendpoint.publishedservice=ix-traefik/traefik-tcp
      --entrypoints.web.http.redirections.entryPoint.to=:443
      --entrypoints.web.http.redirections.entryPoint.scheme=https
      --entrypoints.websecure.http.tls=true
      --log.level=DEBUG
      --pilot.token=a0dc2705-ee30-4e6f-ae11-c4554ec0b324
      --pilot.dashboard=true
      --metrics.prometheus
      --ping
      --serverstransport.insecureskipverify=true
      --providers.kubernetesingress.allowexternalnameservices=true
    State:          Running
...

### Application Configuration

_Only including relevant config_

Configure Extra Args arg --experimental.plugins.rewritebody.modulename=github.com/traefik/plugin-rewritebody arg --experimental.plugins.rewritebody.version=v0.3.1 arg accesslog=true arg accesslog.fields.headers.defaultmode=keep



### Describe the bug

I have defined extra args to be passed to the launch command of Traefik to add support for plugins as well as other configuration. The command line args are used by the current chart but the additional ones provided are excluded.

### To Reproduce

1. Add args to Extra Args in TrueNAS deployment of TrueCharts Traefik
2. Save and deploy updated configuration
3. Check kubectl describe of resulting pod

### Expected Behavior

Chart setup Extra Args are included in resulting deployment configuration

### Screenshots

n/a

### Additional Context

I have also tried to configure options using Container Environment variables to no avail. My primary goal is to be able to add custom static configuration to my deployment of Traefik, whichever way is easiest. I would love to be able to mount a host directory to `/etc/traefik` and provide settings there but I feel getting the currently existing configuration options working is important as well. I am happy to open a feature request for other aspects of more complete Traefik support but I am unsure if they were ignored for a reason.

### I've read and agree with the following

- [X] I've checked all open and closed issues and my issue is not there.
PrivatePuffin commented 2 years ago

Extra args are already reported to be not-working globally and are part of the common refactor.

However: We will never officially support extra args for Traefik. As they will inherently interfere with our own arg that are set in the background at times.

Plugins are also not officially supported by us either. We rather have a good solid deployment for time being than support each and every feature of each and every App.

We're open to support some extra middlewares and/or plugins for traefik to complete our Traefik support. However, we don't take enhancement requests for each and every middleware or plugin out-there.

(like: there are public lists for those, no need to duplicate those just because you also want them on SCALE)

You either add it yourself or have to wait till someone adds it.

Also: seperate bug reports from enhencements next time. I'm closing this because this report is a clusterfuck.

Tronix117 commented 2 years ago

I can understand why plugin support is not there, but I have trouble understanding why expert feature "extra args" is a no-go for Traefik ?

It's flagged as "expert", and thus should be safe to use by so-called "experts", usualy it will be used only by people that knows how to debug, if there is a conflict with your own args, or if things does not work as expected.

packruler commented 2 years ago

Correct me if I'm wrong. But, Extra Arguments are utilized to provide a minimum subset of functionality. Therefore, allowing users to provide additional custom arguments would add a potential conflicts with limited reliable methods to protect against them.

I expect the target of TrueCharts is to allow advanced control, within reason. This inherently limits the potential users trying advanced features and expecting support for getting them working.

That said, I ended up adding my feature to the TrueCharts system and found the process to be refreshingly well run. There are plenty of tools built in to get development up and running quickly. I am keeping my eyes open for Traefik feature requests and will implement them if needed.

truecharts-admin commented 1 year ago

This issue is locked to prevent necro-posting on closed issues. Please create a new issue or contact staff on discord of the problem persists