This is an automated email from the ASF dual-hosted git repository.

shreemaanabhishek pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git


The following commit(s) were added to refs/heads/dev by this push:
     new 9660fe3  feat: override nginx http lua shared dict configurations 
(#690)
9660fe3 is described below

commit 9660fe35cc5fd662c708df934909006d62254b9b
Author: Junyeong Jang <[email protected]>
AuthorDate: Sun Aug 4 17:13:22 2024 +0900

    feat: override nginx http lua shared dict configurations (#690)
---
 charts/apisix/README.md                | 3 ++-
 charts/apisix/templates/configmap.yaml | 3 +++
 charts/apisix/values.yaml              | 7 ++++++-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/charts/apisix/README.md b/charts/apisix/README.md
index f39508d..17d2a9e 100644
--- a/charts/apisix/README.md
+++ b/charts/apisix/README.md
@@ -89,7 +89,7 @@ The command removes all the Kubernetes components associated 
with the chart and
 | apisix.luaModuleHook.hookPoint | string | `""` | the hook module which will 
be used to inject third party code into APISIX use the lua require style like: 
"module.say_hello" |
 | apisix.luaModuleHook.luaPath | string | `""` | extend lua_package_path to 
load third party code |
 | apisix.nginx.configurationSnippet | object | 
`{"httpAdmin":"","httpEnd":"","httpSrv":"","httpStart":"","main":"","stream":""}`
 | Custom configuration snippet. |
-| apisix.nginx.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.nginx.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#L48-L51)
 to learn the format of a shared dict |
 | apisix.nginx.enableCPUAffinity | bool | `true` |  |
 | apisix.nginx.envs | list | `[]` |  |
 | apisix.nginx.keepaliveTimeout | string | `"60s"` | Timeout during which a 
keep-alive client connection will stay open on the server side. |
@@ -99,6 +99,7 @@ The command removes all the Kubernetes components associated 
with the chart and
 | apisix.nginx.logs.enableAccessLog | bool | `true` | Enable access log or 
not, default true |
 | apisix.nginx.logs.errorLog | string | `"/dev/stderr"` | Error log path |
 | apisix.nginx.logs.errorLogLevel | string | `"warn"` | Error log level |
+| apisix.nginx.luaSharedDictsOverride | object | `{}` | Overrides 
[lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) 
settings, click 
[here](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L258)
 to view the default values. |
 | apisix.nginx.workerConnections | string | `"10620"` |  |
 | apisix.nginx.workerProcesses | string | `"auto"` |  |
 | apisix.nginx.workerRlimitNofile | string | `"20480"` |  |
diff --git a/charts/apisix/templates/configmap.yaml 
b/charts/apisix/templates/configmap.yaml
index e3917c6..2864e5b 100644
--- a/charts/apisix/templates/configmap.yaml
+++ b/charts/apisix/templates/configmap.yaml
@@ -198,6 +198,9 @@ data:
           {{ $dict.name }}: {{ $dict.size }}
         {{- end }}
         {{- end }}
+        {{- if .Values.apisix.nginx.luaSharedDictsOverride }}
+        lua_shared_dict: {{- toYaml 
.Values.apisix.nginx.luaSharedDictsOverride | nindent 10 }}
+        {{- end }}
       {{- if .Values.apisix.nginx.configurationSnippet.main }}
       main_configuration_snippet: {{- toYaml 
.Values.apisix.nginx.configurationSnippet.main | indent 6 }}
       {{- end }}
diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml
index 6c7cd9c..a3aea93 100644
--- a/charts/apisix/values.yaml
+++ b/charts/apisix/values.yaml
@@ -392,13 +392,18 @@ apisix:
       stream: |
 
     # -- 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
+    # click 
[here](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/values.yaml#L48-L51)
 to learn the format of a shared dict
     customLuaSharedDicts: []
       # - name: foo
       #   size: 10k
       # - name: bar
       #   size: 1m
 
+    # -- Overrides 
[lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
+    # click 
[here](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L258)
 to view the default values.
+    luaSharedDictsOverride: {}
+      # prometheus-metrics: 100m
+
   discovery:
     # -- Enable or disable Apache APISIX integration service discovery
     enabled: false

Reply via email to