Skip to content

Commit

Permalink
feat: add kubernetes discovery module
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixiongdu committed Feb 9, 2022
1 parent 7849b8b commit 02ef870
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apisix/discovery/kubernetes/informer_factory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ local function list_watch(informer, apiserver)

if not ok then
informer.fetch_state = "connect failed"
core.log.error("connect apiserver failed , apiserver.host: ", apiserver.host,
core.log.error("connect apiserver failed, apiserver.host: ", apiserver.host,
", apiserver.port: ", apiserver.port, ", message : ", message)
return false
end
Expand Down Expand Up @@ -346,7 +346,7 @@ function _M.new(group, version, kind, plural, namespace)
end

local path = ""
if group or group == "" then
if group == nil or group == "" then
path = path .. "/api/" .. version
else
path = path .. "/apis/" .. group .. "/" .. version
Expand Down
2 changes: 1 addition & 1 deletion apisix/discovery/kubernetes/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function _M.init_worker()
-- TODO: maybe we can read dict name from discovery config
endpoint_dict = ngx.shared.discovery
if not endpoint_dict then
error("failed to get ngx.shared.dict discovery")
error("failed to get Nginx shared dict: discovery, please check your APISIX version")
end

if process.type() ~= "privileged agent" then
Expand Down

0 comments on commit 02ef870

Please sign in to comment.