apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ing
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^(/[a-z1-9\-]*)$ $1/ redirect;
spec:
  rules:
  - http:
      paths:
      - path: /ci(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: el-tekton-ci
            port:
              number: 8080
      - path: /demo(/|$)(.*)
        pathType: Prefix
        backend:
          service:
            name: cnd-demo
            port:
              number: 8080