apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: beep-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-origin: "http://beepchat.com"
spec:
  rules:
    - host: beepchat.com
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: client-service
                port:
                  number: 80

    - host: auth.beepchat.com
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: auth-service
                port:
                  number: 80

    - host: static.beepchat.com
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: static-service
                port:
                  number: 80

    - host: file.beepchat.com
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: file-service
                port:
                  number: 80

    - host: socket.beepchat.com
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: socket-service
                port:
                  number: 80
