From 4d5b1da642d6f95783b9643bba3ca31bab6d487e Mon Sep 17 00:00:00 2001 From: Steve Zesch Date: Wed, 6 Sep 2023 23:03:13 -0400 Subject: [PATCH] feat(acme): add scan_count to redis storage schema * bump lua-resty-acme plugin to 0.12.0 * expose scan_count in redis storage schema to configure the number of keys returned in redis scan calls --- kong-3.5.0-0.rockspec | 2 +- kong/clustering/compat/removed_fields.lua | 7 +++++++ kong/plugins/acme/schema.lua | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/kong-3.5.0-0.rockspec b/kong-3.5.0-0.rockspec index 00a77ead0fd..a2fb78edad4 100644 --- a/kong-3.5.0-0.rockspec +++ b/kong-3.5.0-0.rockspec @@ -37,7 +37,7 @@ dependencies = { "lua-resty-openssl == 0.8.25", "lua-resty-counter == 0.2.1", "lua-resty-ipmatcher == 0.6.1", - "lua-resty-acme == 0.11.0", + "lua-resty-acme == 0.12.0", "lua-resty-session == 4.0.5", "lua-resty-timer-ng == 0.2.5", "lpeg == 1.0.2", diff --git a/kong/clustering/compat/removed_fields.lua b/kong/clustering/compat/removed_fields.lua index d41af4bf0f6..8c493301303 100644 --- a/kong/clustering/compat/removed_fields.lua +++ b/kong/clustering/compat/removed_fields.lua @@ -96,4 +96,11 @@ return { "response_headers", }, }, + + -- Any dataplane older than 3.5.0 + [3005000000] = { + acme = { + "storage_config.redis.scan_count", + }, + }, } diff --git a/kong/plugins/acme/schema.lua b/kong/plugins/acme/schema.lua index ee21116847e..df50fc743d1 100644 --- a/kong/plugins/acme/schema.lua +++ b/kong/plugins/acme/schema.lua @@ -52,6 +52,7 @@ local REDIS_STORAGE_SCHEMA = { custom_validator = validate_namespace } }, + { scan_count = { type = "number", required = false, default = 10, description = "The number of keys to return in Redis SCAN calls." } }, } local CONSUL_STORAGE_SCHEMA = {