feat(clustering): do not enable kong.sync.v2 when connecting dp is older than cp #14217
+29
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
There is a compatibility feature in v1 sync. While building compatibility layer for v2 sync (Lua Control Plane), we found that it is making things too complicated. Thus we decided that when DP version is older than CP version, we can just fallback to v1 sync until DP is upgraded to same level and it can utilize the v2 sync again.
This code here hides the CP capability of
kong.sync.v2
when older (than the CP) DP connects to it. The DPs can already fallback in that scenario, so this code is just for the control plane.I don't think this needs a changelog. It is not a fix. It is very tiny too, and the first time we ever need this is when we release 3.11.
KAG-6240
Checklist
A changelog file has been created underchangelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdThere is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE