Skip to content

Commit 9660fe3

Browse files
authored
feat: override nginx http lua shared dict configurations (#690)
1 parent 8707bd6 commit 9660fe3

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

charts/apisix/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The command removes all the Kubernetes components associated with the chart and
8989
| 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" |
9090
| apisix.luaModuleHook.luaPath | string | `""` | extend lua_package_path to load third party code |
9191
| apisix.nginx.configurationSnippet | object | `{"httpAdmin":"","httpEnd":"","httpSrv":"","httpStart":"","main":"","stream":""}` | Custom configuration snippet. |
92-
| 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 |
92+
| 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 |
9393
| apisix.nginx.enableCPUAffinity | bool | `true` | |
9494
| apisix.nginx.envs | list | `[]` | |
9595
| 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
9999
| apisix.nginx.logs.enableAccessLog | bool | `true` | Enable access log or not, default true |
100100
| apisix.nginx.logs.errorLog | string | `"/dev/stderr"` | Error log path |
101101
| apisix.nginx.logs.errorLogLevel | string | `"warn"` | Error log level |
102+
| 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. |
102103
| apisix.nginx.workerConnections | string | `"10620"` | |
103104
| apisix.nginx.workerProcesses | string | `"auto"` | |
104105
| apisix.nginx.workerRlimitNofile | string | `"20480"` | |

charts/apisix/templates/configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ data:
198198
{{ $dict.name }}: {{ $dict.size }}
199199
{{- end }}
200200
{{- end }}
201+
{{- if .Values.apisix.nginx.luaSharedDictsOverride }}
202+
lua_shared_dict: {{- toYaml .Values.apisix.nginx.luaSharedDictsOverride | nindent 10 }}
203+
{{- end }}
201204
{{- if .Values.apisix.nginx.configurationSnippet.main }}
202205
main_configuration_snippet: {{- toYaml .Values.apisix.nginx.configurationSnippet.main | indent 6 }}
203206
{{- end }}

charts/apisix/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,18 @@ apisix:
392392
stream: |
393393
394394
# -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
395-
# 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
395+
# 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
396396
customLuaSharedDicts: []
397397
# - name: foo
398398
# size: 10k
399399
# - name: bar
400400
# size: 1m
401401

402+
# -- Overrides [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
403+
# click [here](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L258) to view the default values.
404+
luaSharedDictsOverride: {}
405+
# prometheus-metrics: 100m
406+
402407
discovery:
403408
# -- Enable or disable Apache APISIX integration service discovery
404409
enabled: false

0 commit comments

Comments
 (0)