apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ticketing-dev
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/use-regex: 'true'
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    cert-manager.io/cluster-issuer: cert-manager-subca
spec:
  tls:
    - hosts:
      - ticketing.dev
      secretName: ticketing-dev-tls
  rules:
    - host: ticketing.dev
      http:
        paths:
        - path: /api/users/?(.*)
          pathType: Prefix
          backend:
            service: 
              name: auth-srv
              port:
                  number: 3000
        - path: /?(.*)
          pathType: Prefix
          backend:
            service:
              name: client-srv
              port:
                number: 3000
