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

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


The following commit(s) were added to refs/heads/master by this push:
     new 33160ee  feat: support to configure custom lua shared dicts (#162)
33160ee is described below

commit 33160ee73a8b9c74d597c81e6307db5245d99106
Author: Alex Zhang <[email protected]>
AuthorDate: Wed Oct 27 10:35:35 2021 +0800

    feat: support to configure custom lua shared dicts (#162)
    
    Signed-off-by: Chao Zhang <[email protected]>
---
 charts/apisix/templates/configmap.yaml | 8 ++++++--
 charts/apisix/values.yaml              | 6 ++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/charts/apisix/templates/configmap.yaml 
b/charts/apisix/templates/configmap.yaml
index 8ed462b..278f5cf 100644
--- a/charts/apisix/templates/configmap.yaml
+++ b/charts/apisix/templates/configmap.yaml
@@ -153,8 +153,12 @@ data:
         real_ip_from:                  # 
http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
           - 127.0.0.1
           - 'unix:'
-        #lua_shared_dicts:              # add custom shared cache to nginx.conf
-        #  ipc_shared_dict: 100m        # custom shared cache, format: 
`cache-key: cache-size`
+        {{- if .Values.apisix.customLuaSharedDicts }}
+        lua_shared_dicts:              # add custom shared cache to nginx.conf
+        {{- range $dict := .Values.apisix.customLuaSharedDicts }}
+          {{ $dict.name }}: {{ $dict.size }}
+        {{- end }}
+        {{- end }}
 
     etcd:
     {{- if .Values.etcd.enabled }}
diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml
index e4a161d..247ec74 100644
--- a/charts/apisix/values.yaml
+++ b/charts/apisix/values.yaml
@@ -23,6 +23,12 @@ apisix:
   # Set it to false and ingress-controller.enabled=true will deploy only 
ingress-controller
   enabled: true
 
+  customLuaSharedDicts: []
+    # - name: foo
+    #   size: 10k
+    # - name: bar
+    #   size: 1m
+
   image:
     repository: apache/apisix
     pullPolicy: IfNotPresent

Reply via email to