apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress
  annotations:
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  rules:
    - host: webmon.local
      http:
        paths:
          - path: /web(/|$)(.*)
            pathType: Prefix
            backend:
              service:
                 name: webmon
                 port:
                   number: 80
          - path: /prom(/|$)(.*)
            pathType: Prefix
            backend:
              service:
                 name: prometheus-operated
                 port:
                   number: 9090
    - host: grafana.local
      http:
        paths:
          - path: /grafana(/|$)(.*)
            pathType: Prefix
            backend:
              service:
                 name: grafana
                 port:
                   number: 3000
