canonical / traefik-route-k8s-operator

https://charmhub.io/traefik-route-k8s
Apache License 2.0
0 stars 3 forks source link

Traefik-route-k8s renders rules without `stripPrefix` middleware #40

Open natalian98 opened 1 year ago

natalian98 commented 1 year ago

Bug Description

The traefik-route-k8s doesn't generate rules with the stripPrefix middleware, while the "ingress-per-app" does so. Is this intentional? Is that middleware not needed with ingress-per-unit?

An example rule rendered by

To Reproduce

  1. juju deploy traefik-route-k8s root_url=...
  2. juju deploy traefik-k8s
  3. juju deploy prometheus-k8s
  4. juju relate traefik-route-k8s prometheus-k8s
  5. juju relate traefik-route-k8s traefik-k8s

Environment

n/a

Relevant log output

n/a

Additional context

No response

simskij commented 1 year ago

The middleware is not strictly needed in any routing mode. However, it often makes a lot of sense to have it to simplify reverse proxying. I just think no one has asked for this middleware to be available in the route charm, so no time has been invested in adding it.

sed-i commented 1 year ago

Related (for future reference): https://github.com/canonical/grafana-k8s-operator/pull/246

PietroPasotti commented 11 months ago

@natalian98 can you try out https://github.com/canonical/traefik-route-k8s-operator/pull/47 ?