Skip to content
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

feat: support resolve default value when environment not set #5675

Merged
merged 11 commits into from
Dec 6, 2021

Conversation

kevinw66
Copy link
Contributor

@kevinw66 kevinw66 commented Dec 2, 2021

Thanks for review my first pull request for apisix.
And this is my first time use lua. Give me some advices if possible, thanks.

This is about read default value when ENV not set, I think this may helpful when using k8s in different environment and did not want to set so many ENV variable

result:
etcd.host = http://${{ETCD_HOST}}:2379

image

etcd.host = http://${{ETCD_HOST:123ss}}:2379
image

etcd.host = http://${{ETCD_HOST:123ss:123aa}}:2379
image

apisix/cli/file.lua Outdated Show resolved Hide resolved
t/cli/test_main.sh Outdated Show resolved Hide resolved
t/cli/test_main.sh Outdated Show resolved Hide resolved
t/cli/test_main.sh Outdated Show resolved Hide resolved
t/cli/test_main.sh Outdated Show resolved Hide resolved
conf/config.yaml Outdated Show resolved Hide resolved
apisix/cli/file.lua Outdated Show resolved Hide resolved
@kevinw66
Copy link
Contributor Author

kevinw66 commented Dec 5, 2021

BTW, Can you help me to check the ut? I'm confusing about the error log, and it cannot run in my local machine right now.

@spacewander
Copy link
Member

Solving with #5699

t/cli/test_main.sh Outdated Show resolved Hide resolved
@moonming
Copy link
Member

moonming commented Dec 6, 2021

@kevinw66 great work 👍

@spacewander spacewander merged commit a65aa09 into apache:master Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants