You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "dennispan (via GitHub)" <gi...@apache.org> on 2025/05/07 01:01:00 UTC
[PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
dennispan opened a new pull request, #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822
This addresses the need from https://github.com/apache/apisix-helm-chart/issues/769
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822#discussion_r2078852465
##########
charts/apisix/values.yaml:
##########
@@ -440,14 +440,20 @@ apisix:
stream: |
- # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
+ # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#lua_shared_dict) 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
customLuaSharedDicts: []
# - name: foo
# size: 10k
# - name: bar
# size: 1m
+ # -- Override default [lua_shared_dict](https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L250-L276) 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
+ luaSharedDicts: []
+ # - name: prometheus-metrics
+ # size: 20m
Review Comment:
This example is inappropriate, prometheus is defined using the special command for `meta { lua_shared_dict }`, which cannot be overridden by `http { lua_shared_dict }`, but it does override other dict values, such as those used by limit-count.
ref: https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L165-L168
This is a special case for creating shared memory between the HTTP subsystem and the stream subsystem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "dennispan (via GitHub)" <gi...@apache.org>.
dennispan commented on code in PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822#discussion_r2095026038
##########
charts/apisix/values.yaml:
##########
@@ -440,14 +440,20 @@ apisix:
stream: |
- # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
+ # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#lua_shared_dict) 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
customLuaSharedDicts: []
# - name: foo
# size: 10k
# - name: bar
# size: 1m
+ # -- Override default [lua_shared_dict](https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L250-L276) 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
+ luaSharedDicts: []
+ # - name: prometheus-metrics
+ # size: 20m
Review Comment:
I used this to test (after a re-deployment to pick up the configuration changes):
```
/usr/local/openresty/nginx/sbin/nginx -T \
-p /usr/local/apisix/ \
-c conf/nginx.conf \
| grep lua_shared_dict
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "dennispan (via GitHub)" <gi...@apache.org>.
dennispan commented on code in PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822#discussion_r2119372451
##########
charts/apisix/values.yaml:
##########
@@ -440,14 +440,20 @@ apisix:
stream: |
- # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
+ # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#lua_shared_dict) 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
customLuaSharedDicts: []
# - name: foo
# size: 10k
# - name: bar
# size: 1m
+ # -- Override default [lua_shared_dict](https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L250-L276) 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
+ luaSharedDicts: []
+ # - name: prometheus-metrics
+ # size: 20m
Review Comment:
@Baoyuantop @bzp2010 any update on this? Anything else needed from me to move this forward?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822#discussion_r2086647646
##########
charts/apisix/values.yaml:
##########
@@ -440,14 +440,20 @@ apisix:
stream: |
- # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
+ # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#lua_shared_dict) 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
customLuaSharedDicts: []
# - name: foo
# size: 10k
# - name: bar
# size: 1m
+ # -- Override default [lua_shared_dict](https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L250-L276) 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
+ luaSharedDicts: []
+ # - name: prometheus-metrics
+ # size: 20m
Review Comment:
@dennispan
Maybe we can move to another example case that is sure to be ok, so we can merge it first, and if it works on `prometheus-metrics`, that would solve your problem, and you can report it to community if that works.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "swapnil-omni (via GitHub)" <gi...@apache.org>.
swapnil-omni commented on code in PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822#discussion_r2137165168
##########
charts/apisix/templates/configmap.yaml:
##########
Review Comment:
This does not work.
The nginx config is like this
```
lua_shared_dict:
prometheus-metrics: 20m
```
This created config like this
```
lua_shared_dict:
- prometheus-metrics: 20m
```
so this should be
```
{{- range $dict := .Values.apisix.nginx.luaSharedDicts }}
{{ $dict.name }}: {{ $dict.size }}
```
https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L250-L276
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "nic-6443 (via GitHub)" <gi...@apache.org>.
nic-6443 merged PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "dennispan (via GitHub)" <gi...@apache.org>.
dennispan commented on code in PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822#discussion_r2078919863
##########
charts/apisix/values.yaml:
##########
@@ -440,14 +440,20 @@ apisix:
stream: |
- # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
+ # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#lua_shared_dict) 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
customLuaSharedDicts: []
# - name: foo
# size: 10k
# - name: bar
# size: 1m
+ # -- Override default [lua_shared_dict](https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L250-L276) 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
+ luaSharedDicts: []
+ # - name: prometheus-metrics
+ # size: 20m
Review Comment:
@bzp2010 I actually tried `meta` but it doesn't work. And overriding it under `http` does
At least it didn't work for me. Maybe I'm missing something.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "dennispan (via GitHub)" <gi...@apache.org>.
dennispan commented on code in PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822#discussion_r2138027079
##########
charts/apisix/templates/configmap.yaml:
##########
Review Comment:
Indeed. Here's the pr: https://github.com/apache/apisix-helm-chart/pull/832
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "bzp2010 (via GitHub)" <gi...@apache.org>.
bzp2010 commented on code in PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822#discussion_r2086647646
##########
charts/apisix/values.yaml:
##########
@@ -440,14 +440,20 @@ apisix:
stream: |
- # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
+ # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#lua_shared_dict) 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
customLuaSharedDicts: []
# - name: foo
# size: 10k
# - name: bar
# size: 1m
+ # -- Override default [lua_shared_dict](https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L250-L276) 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
+ luaSharedDicts: []
+ # - name: prometheus-metrics
+ # size: 20m
Review Comment:
@dennispan
Maybe we can move to another example case that is sure to be ok, so we can merge it first, and if it works on `prometheus-metrics`, that would solve your problem, and you can report it to community
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: support setting default http lua_shared_dict [apisix-helm-chart]
Posted by "nic-6443 (via GitHub)" <gi...@apache.org>.
nic-6443 commented on code in PR #822:
URL: https://github.com/apache/apisix-helm-chart/pull/822#discussion_r2127809083
##########
charts/apisix/values.yaml:
##########
@@ -440,14 +440,20 @@ apisix:
stream: |
- # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings,
+ # -- Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#lua_shared_dict) 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
customLuaSharedDicts: []
# - name: foo
# size: 10k
# - name: bar
# size: 1m
+ # -- Override default [lua_shared_dict](https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L250-L276) 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
+ luaSharedDicts: []
+ # - name: prometheus-metrics
+ # size: 20m
Review Comment:
When the Prometheus plugin is not enabled under the stream subsystem (default behavior), `http { lua_shared_dict }` is useful: https://github.com/apache/apisix/blob/58066abc88df37a490f6c04011ed9588a0bda0d1/apisix/cli/ngx_tpl.lua#L329-L331
so this example can be retained.
@dennispan can you fix CI of this PR? you can run `make helm-docs` in your local and commit changes of docs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org