Files
oc-k8s/utils/assets/templates/oc-auth/ingress.yaml
2026-02-24 08:51:48 +01:00

32 lines
741 B
YAML

{{- if index .Values.ocAuth.enabled }}
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: oc-auth-ingress
spec:
entryPoints:
- web
routes:
- kind: Rule
match: Host(`{{ .Values.host }}`) && PathPrefix(`/auth`)
priority: 10
services:
- kind: Service
name: oc-auth-svc
port: 8080
middlewares:
{{- if index .Values.ocAuth.enableTraefikProxyIntegration }}
- name: root-forward-auth
{{- end }}
- name: strip-auth-prefix
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: strip-auth-prefix
spec:
replacePathRegex:
regex: ^/auth(.*)
replacement: /oc$1
{{- end }}