oc-k8s/opencloud/templates/oc-peer/ingress.yaml
2025-03-27 13:04:29 +01:00

33 lines
735 B
YAML

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