apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: quizzes-ingress
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    kubernetes.io/ingress.class: nginx
spec:
  tls:
  - hosts:
    - quizzes.mooc.fi
    - quizzes2.mooc.fi
    secretName: quizzes-cert-secret
  rules:
  - host: quizzes.mooc.fi
    http:
      paths:
      - backend:
          service:
            name: quizzes-backend-service
            port:
              number: 80
        path: /api/
        pathType: Prefix
      - backend:
          service:
            name: quizzes-backendv2-service
            port:
              number: 80
        path: /api/v2/
        pathType: Prefix
      - backend:
          service:
            name: quizzes-dashboardv2-service
            port:
              number: 80
        path: /
        pathType: Prefix
