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