apiVersion: v1
kind: ConfigMap
metadata:
  name: traefik-dynamic
data:
  config.yml: |
    # tls:
    #   stores:
    #     default:
    #       defaultCertificate:
    #         certFile: /etc/traefik/certs/tls.crt
    #         keyFile: /etc/traefik/certs/tls.key

    http:
      middlewares:
        oidc:
          forwardauth:
            address: http://oidc:4181
            authResponseHeaders: X-Forwarded-User
            trustForwardHeader: true
      routers:
        app:
          rule: PathPrefix(`/`)
          service: app
        app-tls:
          rule: PathPrefix(`/`)
          service: app
          tls: {}
      services:
        app:
          loadBalancer:
            servers:
              - url: http://app
