apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: demo-new
  labels:
    app.kubernetes.io/part-of: villas-web
  annotations:  
    kubernetes.io/ingress.class: nginx
    cert-manager.io/cluster-issuer: letsencrypt-prod
    eonerc.rwth-aachen.de/description: VILLASweb
    eonerc.rwth-aachen.de/link: https://git.rwth-aachen.de/acs/public/villas/VILLASweb
spec:
  tls:
  - hosts:
    - villas-new.k8s.eonerc.rwth-aachen.de
    secretName: letsencrypt-prod-villas-demo-new
  rules:
  - host: villas-new.k8s.eonerc.rwth-aachen.de
    http:
      paths:
      - path: /
        backend:
          serviceName: frontend-new
          servicePort: http
      - path: /api/
        backend:
          serviceName: backend-go
          servicePort: http
      - path: /rabbitmq/
        backend:
          serviceName: broker
          servicePort: web-admin
      - path: /swagger/
        backend:
          serviceName: backend-go
          servicePort: http
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: demo-rewrite-new
  labels:
    app.kubernetes.io/part-of: villas-web
  annotations:  
    kubernetes.io/ingress.class: nginx
    cert-manager.io/cluster-issuer: letsencrypt-prod
    eonerc.rwth-aachen.de/description: VILLASweb
    eonerc.rwth-aachen.de/link: https://git.rwth-aachen.de/acs/public/villas/VILLASweb
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  tls:
  - hosts:
    - villas-new.k8s.eonerc.rwth-aachen.de
    secretName: letsencrypt-prod-villas-demo-new
  rules:
  - host: villas-new.k8s.eonerc.rwth-aachen.de
    http:
      paths:
      - path: /ws/relay(/|$)(.*)
        backend:
          serviceName: relay
          servicePort: http
      - path: /ws(/|$)(.*)
        backend:
          serviceName: node
          servicePort: http
      - path: /mockup(/|$)(.*)
        backend:
          serviceName: node
          servicePort: http
