Closed dhrp closed 4 years ago
But it is actually there...
@dhrp the validation code is not located in ingress-nginx but in the kubernetes repository https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/networking/validation/validation.go#L382
Closing. This is an issue in the main Kubernetes repository. There is nothing to do in ingress-nginx
NGINX Ingress controller version: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.30.0
Kubernetes version (use
kubectl version
): v1.15.9-gke.24 (but I also tried on kubernetes 17.2)Environment:
GKE (standard)
Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release):
Kernel (e.g.
uname -a
):Install tools:
Others:
What happened: My (valid) regular expression is being refused.
The Ingress "myingress" is invalid: spec.rules[0].http.paths[1].path: Invalid value: "/go(?:/|$)(.*)": must be a valid regex
Here is an example ingress spec, which includes the annotations
What you expected to happen: I expect the regular expression to be accepted.
The issue occurs when using the non-capturing group (?:re). It also happens with some other PCRE compatible regexes.
If you look at this issue, you'd expect that the regular expression is blocked by the ingress validator because it's not in the re2 spec. But it is actually there... You can test it here: https://regex-golang.appspot.com/assets/html/index.html
Now... I understand this issue should probably be filed (also) to whatever validates ingress on k8s, but I couldn't find the correct location for that.
How to reproduce it:
Anything else we need to know:
Would be happy to file this in the right location too, if someone can point me there.
/kind bug