Baoyuantop commented on code in PR #12057:
URL: https://github.com/apache/apisix/pull/12057#discussion_r2009909607
##########
apisix/discovery/kubernetes/init.lua:
##########
@@ -324,23 +333,31 @@ local function get_apiserver(conf)
return nil, err
end
elseif conf.client.token_file and conf.client.token_file ~= "" then
- local file
- file, err = read_env(conf.client.token_file)
- if err then
- return nil, err
- end
+ setmetatable(apiserver, {
+ __index = function(_, key)
+ if key ~= "token" then
Review Comment:
This modification requires a function call to fetch the value, which adds
complexity in the current scenario.
--
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]