-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request help: Apisix ingress controller config.yaml couldn't read os environment variable #710
Comments
This is normal, because apisix and apisix-ingress-controller are two independent software. The former supports the use of environment variables when parsing configuration files( code link ), and the latter has not been implemented. |
Thanks for quick response! Looking forward to this feature. And could I just use the k8s command flags to config the apisix-ingress-controller. Is this recommend practice before this feature?
|
Using command is OK, but it will make the deployment yaml a bit more complicated. What we use in the helm chart is configmap for configuration file, I don't know why you didn't use it? |
As for helm chart, I used it when I did poc of apisix. However, as for production use, our company prefer to use deployment yaml directly. As for configMap, actaully my first choice is configMap. However, just as I said in the begainning, when I mount the configMap as config.yaml, the config.yaml couldn't set the |
OK, then I think it can be specified temporarily by command. Another way is to build a docker image ( |
The configuration file is parsed directly through the golang code, without bash. |
This is a very good suggestion! Thanks a lot! |
#745 has been merged. This feature has been implemented, I will close this issue. Feel free to reopen it, if you have any questions. |
Issue description
I want to set the default_cluster_admin_key from env variable. I have such config.yaml file and set the
ADMIN_PASSWORD
as env. And I mount the config.yaml as configMap for my apisix-ingress-controller pods. but the config.yaml couldn't read theADMIN_PASSWORD
from os environment.apisix-ingress-controller config.yaml
env config
But the interesting thing is: my apisix config.yaml file could correctly read
ADMIN_PASSWORD
from environment.apisix config.yaml
Environment
apisix-ingress-controller version --long
); 1.2.0kubectl version
); v1.20.11uname -a
). Linux apisix-ingress-controller-6d46bd8c5c-fwzjq 5.4.0-45-generic fix: make labels in asf lowcase #49~18.04.2-Ubuntu SMP Wed Aug 26 16:29:02 UTC 2020 x86_64 LinuxThe text was updated successfully, but these errors were encountered: