Skip to content
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

feat(core): add lmdb validation tag directive #12026

Merged
merged 30 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .requirements
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PCRE=8.45
LIBEXPAT=2.5.0

LUA_KONG_NGINX_MODULE=4fbc3ddc7dcbc706ed286b95344f3cb6da17e637 # 0.8.0
LUA_RESTY_LMDB=d236fc5ba339897e8f2c6ada1c1b4ab9311feee8 # 1.4.0
LUA_RESTY_LMDB=19a6da0616db43baf8197dace59e64244430b3c4 # 1.4.1
LUA_RESTY_EVENTS=8448a92cec36ac04ea522e78f6496ba03c9b1fd8 # 0.2.0
LUA_RESTY_WEBSOCKET=60eafc3d7153bceb16e6327074e0afc3d94b1316 # 0.4.0
ATC_ROUTER=7a2ad42d4246598ba1f753b6ae79cb1456040afa # 1.3.1
Expand Down
3 changes: 0 additions & 3 deletions changelog/unreleased/kong/bump-lua-resty-lmdb-1.4.0.yml

This file was deleted.

3 changes: 3 additions & 0 deletions changelog/unreleased/kong/bump-lua-resty-lmdb-1.4.1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: Bumped lua-resty-lmdb from 1.3.0 to 1.4.1
type: dependency
scope: Core
8 changes: 8 additions & 0 deletions kong/conf_loader/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ local cipher_suites = {
}


-- using kong version, "major.minor"
local LMDB_VALIDATION_TAG = string.match(require("kong.meta").version,
chronolaw marked this conversation as resolved.
Show resolved Hide resolved
"^%d+%.%d+")


local DEFAULT_PATHS = {
"/etc/kong/kong.conf",
"/etc/kong.conf",
Expand Down Expand Up @@ -2002,6 +2007,9 @@ local function load(path, custom_conf, opts)
end
end

-- lmdb validation tag
conf.lmdb_validation_tag = LMDB_VALIDATION_TAG

-- Wasm module support
if conf.wasm then
local wasm_filters = get_wasm_filters(conf.wasm_filters_path)
Expand Down
5 changes: 5 additions & 0 deletions kong/templates/nginx_inject.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@ return [[
> if database == "off" then
lmdb_environment_path ${{LMDB_ENVIRONMENT_PATH}};
lmdb_map_size ${{LMDB_MAP_SIZE}};

> if lmdb_validation_tag then
lmdb_validation_tag $(lmdb_validation_tag);
> end

> end
]]
5 changes: 5 additions & 0 deletions spec/fixtures/custom_nginx.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ $(el.name) $(el.value);
> if database == "off" then
lmdb_environment_path ${{LMDB_ENVIRONMENT_PATH}};
lmdb_map_size ${{LMDB_MAP_SIZE}};

> if lmdb_validation_tag then
lmdb_validation_tag $(lmdb_validation_tag);
> end

> end

events {
Expand Down
Loading