apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: dev-smart-accounting-ingress
  namespace: dev-smart-accounting-services
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/affinity: cookie
    nginx.ingress.kubernetes.io/session-cookie-hash: sha1
    nginx.ingress.kubernetes.io/session-cookie-name: REALTIMESERVERID

spec:
  tls:
  - hosts:
    - smart-accounting.westeurope.cloudapp.azure.com
    secretName: tls-secret
  rules:
  - host: smart-accounting.westeurope.cloudapp.azure.com
    http:
      paths:
      - path: /file-processor-api(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: file-processor-api-svc
            port:
              number: 80
      - path: /processed-document-api(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: processed-document-api-svc
            port:
              number: 80
      - path: /notification-api(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: notification-api-svc
            port:
              number: 80