apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: hw01-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  rules:
  - host: arch.homework
    http:
      paths:
      - path: /()(health)$
        pathType: Exact
        backend:
          service:
            name: hw01-service
            port:
              number: 9000
      - path: /otusapp/dmitry.tsilynko($|/)(.*)
        pathType: Prefix
        backend:
          service:
            name: hw01-service
            port:
              number: 9000