Skip to content

feat(dex): add Traefik IngressRoute support for Dex ingress routing#385

Open
mgrzybek wants to merge 8 commits into
mainfrom
feat/traefik
Open

feat(dex): add Traefik IngressRoute support for Dex ingress routing#385
mgrzybek wants to merge 8 commits into
mainfrom
feat/traefik

Conversation

@mgrzybek

@mgrzybek mgrzybek commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Add an ingress_routing_type config field ('ingress' by default, backward compatible) that switches Dex from Kubernetes Ingress resources to Traefik IngressRoute + Middleware CRDs when set to 'ingressroute'.

The Traefik path creates three Middlewares per Realm (strip X-Remote-User, inject X-Auth-Tenancy-Id, ForwardAuth to the session verify endpoint) and two IngressRoutes (catchall Dex path, authenticated callback), replacing the two nginx-annotated Ingress resources.

The ClusterRole is extended with traefik.io/ingressroutes and traefik.io/middlewares permissions to allow the operator to manage these resources.

Add an ingress_routing_type config field ('ingress' by default, backward
compatible) that switches Dex from Kubernetes Ingress resources to Traefik
IngressRoute + Middleware CRDs when set to 'ingressroute'.

The Traefik path creates three Middlewares per Realm (strip X-Remote-User,
inject X-Auth-Tenancy-Id, ForwardAuth to the session verify endpoint) and
two IngressRoutes (catchall Dex path, authenticated callback), replacing
the two nginx-annotated Ingress resources.

The ClusterRole is extended with traefik.io/ingressroutes and
traefik.io/middlewares permissions to allow the operator to manage these
resources.
@mgrzybek
mgrzybek requested a review from a team as a code owner March 25, 2026 13:59
Comment thread azimuth_identity/config.py Outdated
@m-bull

m-bull commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

This looks good code-wise, thanks.

I'm thinking about how we deal with leftover ingress resources when a version of this is deployed with ingress_routing_type: ingress, and then upgraded to a version where ingress_routing_type: ingressroute.

Should we handle cleaning up ingress resources here, or by some other means (azimuth-ops probably)?

Co-authored-by: Matt Anson <matta@stackhpc.com>
@mgrzybek

Copy link
Copy Markdown
Contributor Author

This looks good code-wise, thanks.

I'm thinking about how we deal with leftover ingress resources when a version of this is deployed with ingress_routing_type: ingress, and then upgraded to a version where ingress_routing_type: ingressroute.

Should we handle cleaning up ingress resources here, or by some other means (azimuth-ops probably)?

This is an operator. We could add some logic into the reconcile loop. This makes sense.

When ingress_routing_type changes between ingress and ingressroute, the
reconciliation loop now deletes resources of the other type, making it
fully convergent. 404s are ignored for fresh deployments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants