apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: restrev-ingress
  namespace: restrev
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    # to use regex on my paths
    nginx.ingress.kubernetes.io/use-regex: "true"
    # also something about the path, rewriting the target, modifying the url
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
spec:
  rules:
    - http:
        paths:
          - path: /?(.*)
            pathType: Prefix
            backend:
              service:
                name: website
                port:
                  number: 4200
          - path: /api/?(.*)
            pathType: Prefix
            backend:
              service:
                name: api
                port:
                  number: 5001
