From 7edf70fc6e0feee06224f69817a3daf35f761ccd Mon Sep 17 00:00:00 2001 From: Nic Date: Thu, 28 Aug 2025 15:21:36 +0800 Subject: [PATCH 1/2] feat: add two uri options to gateway chart Signed-off-by: Nic --- charts/api7/Chart.yaml | 2 +- charts/api7/README.md | 2 +- charts/gateway/README.md | 2 ++ charts/gateway/templates/configmap.yaml | 6 ++++++ charts/gateway/values.yaml | 7 +++++++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/charts/api7/Chart.yaml b/charts/api7/Chart.yaml index 87646fe..0ec0038 100644 --- a/charts/api7/Chart.yaml +++ b/charts/api7/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.17.20 +version: 0.17.21 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/api7/README.md b/charts/api7/README.md index 1c2f48e..b82be77 100644 --- a/charts/api7/README.md +++ b/charts/api7/README.md @@ -1,6 +1,6 @@ # api7ee3 -![Version: 0.17.20](https://img.shields.io/badge/Version-0.17.20-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.8.10](https://img.shields.io/badge/AppVersion-3.8.10-informational?style=flat-square) +![Version: 0.17.21](https://img.shields.io/badge/Version-0.17.21-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.8.10](https://img.shields.io/badge/AppVersion-3.8.10-informational?style=flat-square) A Helm chart for Kubernetes diff --git a/charts/gateway/README.md b/charts/gateway/README.md index 596f0f8..8d81058 100644 --- a/charts/gateway/README.md +++ b/charts/gateway/README.md @@ -61,6 +61,7 @@ The command removes all the Kubernetes components associated with the chart and | apisix.affinity | object | `{}` | Set affinity for API7 Gateway deploy | | apisix.customLuaSharedDicts | list | `[]` | Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings, click [here](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/values.yaml#L27-L30) to learn the format of a shared dict | | apisix.customizedConfig | object | `{}` | If apisix.enableCustomizedConfig is true, full customized config.yaml. Please note that other settings about APISIX config will be ignored | +| apisix.deleteURITailSlash | bool | `false` | Delete the '/' at the end of the URI | | apisix.enableCustomizedConfig | bool | `false` | Enable full customized config.yaml | | apisix.enableIPv6 | bool | `true` | Enable nginx IPv6 resolver | | apisix.enableServerTokens | bool | `true` | Whether the APISIX version number should be shown in Server header | @@ -105,6 +106,7 @@ The command removes all the Kubernetes components associated with the chart and | apisix.kind | string | `"Deployment"` | Use a `DaemonSet` or `Deployment` | | apisix.meta.luaSharedDict.prometheus-metrics | string | `"15m"` | | | apisix.nodeSelector | object | `{}` | Node labels for API7 Gateway pod assignment | +| apisix.normalizeURILikeServlet | bool | `false` | The URI normalization in servlet is a little different from the RFC's. See https://github.com/jakartaee/servlet/blob/master/spec/src/main/asciidoc/servlet-spec-body.adoc#352-uri-path-canonicalization, which is used under Tomcat. Turn this option on if you want to be compatible with servlet when matching URI path. | | apisix.podAnnotations | object | `{}` | Annotations to add to each pod | | apisix.podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1,"minAvailable":"90%"}` | See https://kubernetes.io/docs/tasks/run-application/configure-pdb/ for more details | | apisix.podDisruptionBudget.enabled | bool | `false` | Enable or disable podDisruptionBudget | diff --git a/charts/gateway/templates/configmap.yaml b/charts/gateway/templates/configmap.yaml index d3a223a..8df76f4 100644 --- a/charts/gateway/templates/configmap.yaml +++ b/charts/gateway/templates/configmap.yaml @@ -62,6 +62,12 @@ data: # disk_path: "/tmp/disk_cache_two" # cache_levels: "1:2" + delete_uri_tail_slash: {{ .Values.apisix.deleteURITailSlash }} # delete the '/' at the end of the URI + # The URI normalization in servlet is a little different from the RFC's. + # See https://github.com/jakartaee/servlet/blob/master/spec/src/main/asciidoc/servlet-spec-body.adoc#352-uri-path-canonicalization, + # which is used under Tomcat. + # Turn this option on if you want to be compatible with servlet when matching URI path. + normalize_uri_like_servlet: {{ .Values.apisix.normalizeURILikeServlet }} router: http: {{ .Values.apisix.httpRouter }} # radixtree_uri: match route by uri(base on radixtree) # radixtree_host_uri: match route by host + uri(base on radixtree) diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index 5b714df..9800f29 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -99,6 +99,13 @@ apisix: extraLuaPath: "" extraLuaCPath: "" + # -- Delete the '/' at the end of the URI + deleteURITailSlash: false + # -- The URI normalization in servlet is a little different from the RFC's. + # See https://github.com/jakartaee/servlet/blob/master/spec/src/main/asciidoc/servlet-spec-body.adoc#352-uri-path-canonicalization, + # which is used under Tomcat. + # Turn this option on if you want to be compatible with servlet when matching URI path. + normalizeURILikeServlet: false # -- Defines how apisix handles routing: # - radixtree_uri: match route by uri(base on radixtree) # - radixtree_host_uri: match route by host + uri(base on radixtree) From e5a594aaf7f3e873fcb7783039de0ea9b5817618 Mon Sep 17 00:00:00 2001 From: Nic Date: Thu, 28 Aug 2025 18:00:50 +0800 Subject: [PATCH 2/2] fix indent Signed-off-by: Nic --- charts/gateway/templates/configmap.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/gateway/templates/configmap.yaml b/charts/gateway/templates/configmap.yaml index 8df76f4..805e608 100644 --- a/charts/gateway/templates/configmap.yaml +++ b/charts/gateway/templates/configmap.yaml @@ -62,12 +62,12 @@ data: # disk_path: "/tmp/disk_cache_two" # cache_levels: "1:2" - delete_uri_tail_slash: {{ .Values.apisix.deleteURITailSlash }} # delete the '/' at the end of the URI - # The URI normalization in servlet is a little different from the RFC's. - # See https://github.com/jakartaee/servlet/blob/master/spec/src/main/asciidoc/servlet-spec-body.adoc#352-uri-path-canonicalization, - # which is used under Tomcat. - # Turn this option on if you want to be compatible with servlet when matching URI path. - normalize_uri_like_servlet: {{ .Values.apisix.normalizeURILikeServlet }} + delete_uri_tail_slash: {{ .Values.apisix.deleteURITailSlash }} # delete the '/' at the end of the URI + # The URI normalization in servlet is a little different from the RFC's. + # See https://github.com/jakartaee/servlet/blob/master/spec/src/main/asciidoc/servlet-spec-body.adoc#352-uri-path-canonicalization, + # which is used under Tomcat. + # Turn this option on if you want to be compatible with servlet when matching URI path. + normalize_uri_like_servlet: {{ .Values.apisix.normalizeURILikeServlet }} router: http: {{ .Values.apisix.httpRouter }} # radixtree_uri: match route by uri(base on radixtree) # radixtree_host_uri: match route by host + uri(base on radixtree)