a73x

deploy/server/ingressroute.yaml

Ref:   Size: 1.3 KiB   History

apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: console-https
  namespace: ${NAMESPACE}
spec:
  entryPoints: [websecure]
  routes:
    # The console host rule carries every path, so /mcp answers here too — and
    # this is the origin a proxy fronts. The API host below is not the only way
    # in; it is the way in that doesn't also route the console.
    - match: Host(`${CONSOLE_HOST}`)
      kind: Rule
      services:
        - {name: eitri-server, port: 8080}
    # The API host carries ONLY /mcp: routing the whole host would make it a
    # second console origin, and OIDC sign-in works at exactly oidc.public_url.
    - match: Host(`${API_HOST}`) && PathPrefix(`/mcp`)
      kind: Rule
      services:
        - {name: eitri-server, port: 8080}
  tls:
    secretName: ${TLS_SECRET}
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: console-http
  namespace: ${NAMESPACE}
spec:
  entryPoints: [web]
  routes:
    - match: Host(`${CONSOLE_HOST}`)
      kind: Rule
      middlewares:
        - name: redirect-https
      services:
        - {name: eitri-server, port: 8080}
    - match: Host(`${API_HOST}`) && PathPrefix(`/mcp`)
      kind: Rule
      middlewares:
        - name: redirect-https
      services:
        - {name: eitri-server, port: 8080}