
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    ingress.kubernetes.io/content-type-nosniff: "false"
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    nginx.ingress.kubernetes.io/app-root: /graph
    nginx.ingress.kubernetes.io/configuration-snippet: |
      sub_filter_once on;
      sub_filter '<base href="/"' '<base href="/graph/"';

  name: viewer-ingress
spec:
  rules:
    - http:
        paths:
          - path: /graph(/|$)(.*)
            pathType: Prefix
            backend:
              service:
                name: graph-viewer-service
                port:
                  number: 80
