apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: mtee-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  ingressClassName: nginx
  rules:
    - host: mt.cs.ut.ee  # TODO
      http:
        paths:
          - path: /(translateproxy.*)
            pathType: Prefix
            backend:
              service:
                name: web-proxy
                port:
                  number: 80
          - path: /api/grammar/?(.*)
            pathType: Prefix
            backend:
              service:
                name: grammar-service
                port:
                  number: 80
          - path: /api/speech-to-text/?(.*)
            pathType: Prefix
            backend:
              service:
                name: asr-service
                port:
                  number: 80
          - path: /api/translate/(text.*)
            pathType: Prefix
            backend:
              service:
                name: translation-api
                port:
                  number: 80
          - path: /api/translate/(file.*)
            pathType: Prefix
            backend:
              service:
                name: file-translation-service
                port:
                  number: 80
          - path: /api/translate/(languageDirection.*)
            pathType: Prefix
            backend:
              service:
                name: translation-system
                port:
                  number: 80
          - path: /(.*)
            pathType: Prefix
            backend:
              service:
                name: website
                port:
                  number: 80