-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(clustering): do not enable kong.sync.v2 when connecting dp is o…
…lder than cp (#14217) Signed-off-by: Aapo Talvensaari <[email protected]>
- Loading branch information
Showing
4 changed files
with
168 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
spec/fixtures/custom_plugins/kong/plugins/older-version/handler.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
local meta = require "kong.meta" | ||
|
||
|
||
local version = setmetatable({ | ||
major = 3, | ||
minor = 9, | ||
patch = 0, | ||
}, { | ||
__tostring = function(t) | ||
return string.format("%d.%d.%d%s", t.major, t.minor, t.patch, | ||
t.suffix or "") | ||
end | ||
}) | ||
|
||
|
||
local OlderVersion = { | ||
VERSION = "1.0.0", | ||
PRIORITY = 1000, | ||
} | ||
|
||
|
||
function OlderVersion:init_worker() | ||
meta._VERSION = tostring(version) | ||
meta._VERSION_TABLE = version | ||
meta._SERVER_TOKENS = "kong/" .. tostring(version) | ||
meta.version = tostring(version) | ||
kong.version = meta._VERSION | ||
end | ||
|
||
|
||
return OlderVersion |
18 changes: 18 additions & 0 deletions
18
spec/fixtures/custom_plugins/kong/plugins/older-version/schema.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
local typedefs = require "kong.db.schema.typedefs" | ||
|
||
|
||
return { | ||
name = "older-version", | ||
fields = { | ||
{ | ||
protocols = typedefs.protocols { default = { "http", "https", "tcp", "tls", "grpc", "grpcs" } }, | ||
}, | ||
{ | ||
config = { | ||
type = "record", | ||
fields = { | ||
}, | ||
}, | ||
}, | ||
}, | ||
} |
36e329e
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.
Bazel Build
Docker image available
kong/kong-dev:36e329e2689e65a53f7f01a70fd2acb692f16995
Artifacts available https://github.com/Kong/kong/actions/runs/13119706446