ChuanFF commented on issue #13055:
URL: https://github.com/apache/apisix/issues/13055#issuecomment-4005491534

   @Baoyuantop 
   bug is in init rather than worker init:
   === TEST 3: init phase os.getenv prefix collision
   --- main_config
   env KUBERNETES_CLIENT_TOKEN=some-token;
   env KUBERNETES_CLIENT_TOKEN_FILE=/path/to/token;
   --- extra_init_by_lua
           ngx.shared["test"]:set("iw_token", 
os.getenv("KUBERNETES_CLIENT_TOKEN") or "NIL")
           ngx.shared["test"]:set("iw_token_file", 
os.getenv("KUBERNETES_CLIENT_TOKEN_FILE") or "NIL")
   --- config
       location /t {
           content_by_lua_block {
               ngx.say("TOKEN=", ngx.shared["test"]:get("iw_token"))
               ngx.say("TOKEN_FILE=", ngx.shared["test"]:get("iw_token_file"))
           }
       }
   --- request
   GET /t
   --- response_body
   TOKEN=some-token
   TOKEN_FILE=/path/to/token


-- 
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]

Reply via email to