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

33 lines
766 B
YAML

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