zhixiongdu027 commented on a change in pull request #4880:
URL: https://github.com/apache/apisix/pull/4880#discussion_r802189698
##########
File path: apisix/discovery/kubernetes/init.lua
##########
@@ -29,7 +29,10 @@ local core = require("apisix.core")
local util = require("apisix.cli.util")
local local_conf = require("apisix.core.config_local").local_conf()
local informer_factory =
require("apisix.discovery.kubernetes.informer_factory")
-local endpoint_dict = ngx.shared.discovery
+local endpoint_dict = ngx.shared["discovery"]
+if not endpoint_dict then
+ error("failed to get ngx.shared.dict discovery when load kubernetes
discovery plugin ")
Review comment:
Sorry, I didn't get your point.
Your means is error mesage not clear ?
Maybe your means is local endpoit_dict = ngx.shared.discovery or
error("xxxx") ?
Or move local endpoint_dict into function init_worker()
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]