apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
     - http:
        paths:
          - path: /?(.*)
            pathType: Prefix
            backend:
              service:
                name: frontend-service-prod
                port:
                  number: 3000
          - path: /stream/?(.*)
            pathType: Prefix
            backend:
              service:
                name: stream-service-stream-prod
                port:
                  number: 1935
          - path: /staging/?(.*)
            pathType: Prefix
            backend:
              service:
                name: stream-service-stream-staging
                port:
                  number: 3000
          - path: /staging/stream/?(.*)
            pathType: Prefix
            backend:
              service:
                name: stream-service-stream-staging
                port:
                  number: 1935
