-
Notifications
You must be signed in to change notification settings - Fork 26
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
[traefik-route] middleware in router tls is removed #335
Comments
So this happens because traefik charm generates a tls config for the route and overwrites the one you passed. A fix could be: if the user provided a tls config, respect that instead of overwriting. For now, I suggest you try a workaround: rename your tls router to a different prefix. |
a somewhat more sustainable solution could be to extend the route interface with a |
There is another problem with traefik_route interface itself. The related charm is unaware of the traefik configurations but constructing traefik config based on assumptions. I believe the interface itself needs to pass the relevant traefik configuration to the charm via the interface if it expects the charm to provide complete configuration |
that's not scalable though, you incur precedence issues if you have multiple charms using traefik-route |
@PietroPasotti It works with the workaround you mentioned if i set a priority for |
|
@sed-i I am not sure how the charmhub populates its list but its definitely missing some charms. I looked at ingress interface as well and it does not list any charms owned by Couple of sunbeam charms (nova-k8s, heat-k8s) are using traefik route interface predominantly for 2 reasons:
Note: Sunbeam charms starts multiple apps as separate containers within a pod |
We're seeing this in other places as well, even in our own charms, and I think we might need to start thinking about how to properly support multi-route or multi-port ingressing over the |
Well we don't have My overall though is I think summed up is the following comment canonical/charm-relation-interfaces#79 (comment) |
Bug Description
The charm integrates with traefik via traefik-route interface.
And the charm updates relation data with the dynamic traefik configuration that includes middlewares.
The middlewares added in router non-tls are retained in the file /opt/traefik/juju/ where as the middlewares specified in router tls section are removed.
This is easily reproducible by unit tests. Patch file with unit test attached
To Reproduce
tox -e unit
Environment
Juju 3.4 + microk8s v1.28.7
traefik charm : 1.0/stable 164
However this is reproducible on latest charm as well.
Relevant log output
Additional context
test-traefik-route-middleware-patch.txt
The text was updated successfully, but these errors were encountered: