# Rewrite ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: autosubmit-ingress
  annotations:
    nginx.ingress.kubernetes.io/use-regex: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  ingressClassName: nginx
  rules:
  - host: {{ .Values.ingress.host }}
    http:
      paths:
      - pathType: ImplementationSpecific
        path: "/api(/|$)(.*)"
        backend:
          service:
            name: autosubmit-demo-service
            port:
              number: 8000
---
# Prefix ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: autosubmit-ingress-gui
spec:
  ingressClassName: nginx
  rules:
  - host: {{ .Values.ingress.host }}
    http:
      paths:
      - pathType: Prefix
        path: "/jupyterlab"
        backend:
          service:
            name: autosubmit-demo-service
            port:
              number: 8888
      - pathType: Prefix
        path: "/gui"
        backend:
          service:
            name: autosubmit-demo-service
            port:
              number: 8080
        