From 3f4da0fa0f71df960ab817b4abe6765f41c1f3c1 Mon Sep 17 00:00:00 2001 From: Herr-Sepp Date: Thu, 30 Jan 2020 19:22:41 +0100 Subject: [PATCH] added hint why regular expressions might not be accepted Kubernetes validates all regular expressions using RE2 which does not support the full syntax of PCRE which uses NGINX. see: #4989 --- docs/user-guide/ingress-path-matching.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/user-guide/ingress-path-matching.md b/docs/user-guide/ingress-path-matching.md index 09d39f4c0..0c6d3aea3 100644 --- a/docs/user-guide/ingress-path-matching.md +++ b/docs/user-guide/ingress-path-matching.md @@ -8,6 +8,10 @@ The ingress controller supports **case insensitive** regular expressions in the `spec.rules.http.paths.path` field. This can be enabled by setting the `nginx.ingress.kubernetes.io/use-regex` annotation to `true` (the default is false). +!!! hint +Kubernetes only accept expressions that comply with the RE2 engine syntax. It is possible that valid expressions accepted by NGINX cannot be used with ingress-nginx, because the PCRE library (used in NGINX) supports a wider syntax than RE2. +See the [RE2 Syntax](https://github.com/google/re2/wiki/Syntax) documentation for differences. + See the [description](./nginx-configuration/annotations.md#use-regex) of the `use-regex` annotation for more details. ```yaml