perry2of5 commented on issue #10505:
URL: https://github.com/apache/apisix/issues/10505#issuecomment-3286720883

   I'm having this issue using the standard docker container. I finally just 
put in a script to run before apisix starts to expand the variables.
   
   ```bash
   #!/bin/bash
   
   # for whatever reason, apisix isn't expanding the environment variables in 
apisix.yaml
   # Instead, we'll just do it before apisix starts. This is a hack, but until 
we can
   # figure out why apisix isn't doing it, this will have to do.
   
   cd ${APISIX_CONF_DIR}
   
   env | grep '^KNOWN_PREFIX_' | grep _SVC | while IFS='=' read -r name value ; 
do
     echo expanding $name
     # using sed to replace variable in format ${{VAR_NAME}} in apisix.yaml in 
this directory
     sed -i "s|\${{$name}}|$value|g" apisix.yaml
   done
   ```
   
   I have checked and when the apisix docker container starts it is putting the 
correct env entries in nginx.conf 
   
   It seems like there is an issue around expanding environment variables in 
apisix.yaml that hasn't been address. Is the right thing to open a new ticket 
with an example project? What is the useful way to move this forward? I'm 
feeling sure commenting on a closed ticket might not be the most useful. 
However, I am providing some evidence the environment variables are making it 
into the docker container and that the nginx.conf file has the right env 
entries so maybe that is enough? Let me know! Thanks for the great tool.


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