-
Notifications
You must be signed in to change notification settings - Fork 276
feat: support setting default http lua_shared_dict #822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Comment on lines
+454
to
+455
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This example is inappropriate, prometheus is defined using the special command for 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bzp2010 I actually tried At least it didn't work for me. Maybe I'm missing something.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dennispan, can you provide your test steps? Maybe we can find the problem from them.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I used this to test (after a re-deployment to pick up the configuration changes):
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Baoyuantop @bzp2010 any update on this? Anything else needed from me to move this forward?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the Prometheus plugin is not enabled under the stream subsystem (default behavior), |
||
|
|
||
| discovery: | ||
| # -- Enable or disable Apache APISIX integration service discovery | ||
| enabled: false | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work.
The nginx config is like this
This created config like this
so this should be
https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L250-L276
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Here's the pr: #832