-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(clustering/rpc) support cluster_use_proxy
option for clustering rpc protocol
#13971
base: master
Are you sure you want to change the base?
Conversation
if self.conf.cluster_use_proxy then | ||
local proxy_opts = parse_proxy_url(self.conf.proxy_server) | ||
opts.proxy_opts = { | ||
wss_proxy = proxy_opts.proxy_url, | ||
wss_proxy_authorization = proxy_opts.proxy_authorization, | ||
} | ||
|
||
ngx_log(ngx_DEBUG, "[rpc] using proxy ", proxy_opts.proxy_url, | ||
" to connect control plane") | ||
end | ||
|
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.
Logic comes from kong/clustering//utils.lua: local ok, err = c:connect(uri, opts)
.
kong/kong/clustering/utils.lua
Lines 86 to 95 in 5e6b1f0
if conf.cluster_use_proxy then | |
local proxy_opts = parse_proxy_url(conf.proxy_server) | |
opts.proxy_opts = { | |
wss_proxy = proxy_opts.proxy_url, | |
wss_proxy_authorization = proxy_opts.proxy_authorization, | |
} | |
ngx_log(ngx_DEBUG, _log_prefix, | |
"using proxy ", proxy_opts.proxy_url, " to connect control plane") | |
end |
45c68b5
to
57bcb2c
Compare
record flakiness: https://github.com/Kong/kong/actions/runs/12151750267/job/33886933473?pr=13971, then rerun |
Summary
The original hybrid mode connections like full sync (sync v1) support forward proxy via the option
cluster_use_proxy
. While clustering RPC protocol does not support this, this commit introduces this feature to RPC protocol.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
Fix KAG-5555