AlinsRan commented on code in PR #12284: URL: https://github.com/apache/apisix/pull/12284#discussion_r2153705008
########## apisix/discovery/kubernetes/init.lua: ########## @@ -633,44 +633,62 @@ function _M.init_worker() end -function _M.dump_data() +local function dump_endpoints_from_dict(endpoint_dict) + local keys, err = endpoint_dict:get_keys() + if err then + core.log.error("get keys from discovery dict failed: ", err) + return + end - local eps = {} - for _, conf in ipairs(local_conf.discovery.kubernetes) do + if not keys or #keys == 0 then + return + end - local id = conf.id - local endpoint_dict = get_endpoint_dict(id) - local keys, err = endpoint_dict:get_keys() - if err then - error(err) - break + local k8s = {} Review Comment: This variable name is not appropriate, it should be `endpoints`. -- 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: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org