You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/05 06:35:59 UTC
[GitHub] [apisix] griffenliu opened a new issue #2634: I don't want to set up different config-default.yaml for different environments
griffenliu opened a new issue #2634:
URL: https://github.com/apache/apisix/issues/2634
### Issue description
config template is a very good idea.
But I don't want set up config-default-dev.yaml for dev env when APISIX_PROFILE=dev.
I want to use the same config-default.yaml for both development and production environments.
But I can still use the config.yaml on production env, and the config-dev.yaml on development env.
### Environment
* apisix version (cmd: `apisix version`): 2.0
* OS: Ubuntu
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] griffenliu commented on issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
griffenliu commented on issue #2634:
URL: https://github.com/apache/apisix/issues/2634#issuecomment-722238912
@spacewander yes, #2476 seems to solve my problem, thanks.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] griffenliu commented on issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
griffenliu commented on issue #2634:
URL: https://github.com/apache/apisix/issues/2634#issuecomment-722207573
I has the second problem: when i custom config in the config.yaml. it can't merge. and has some errors.
I found the problem code in the apisix script:
```
local function merge_conf(base, new_tab)
for key, val in pairs(new_tab) do
if type(val) == "table" then
if tab_is_array(val) then
base[key] = val
else
merge_conf(base[key], val)
end
else
base[key] = val
end
end
return base
end
```
can we add custom config support in the config.yaml?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #2634:
URL: https://github.com/apache/apisix/issues/2634
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis closed issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
membphis closed issue #2634:
URL: https://github.com/apache/apisix/issues/2634
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta commented on issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
idbeta commented on issue #2634:
URL: https://github.com/apache/apisix/issues/2634#issuecomment-722242260
Its title should be "DISCUSS".
I think the second question should be raised as another issue, but since it has been fixed, just ignore it :-D
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis commented on issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2634:
URL: https://github.com/apache/apisix/issues/2634#issuecomment-722385441
@griffenliu please feel free to reopen this issue if you still have a question for this issue.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #2634:
URL: https://github.com/apache/apisix/issues/2634#issuecomment-722210756
@griffenliu
Do you mean https://github.com/apache/apisix/pull/2476?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis commented on issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2634:
URL: https://github.com/apache/apisix/issues/2634#issuecomment-722384828
> @membphis
> Should we use the same `config-default.yaml` for different profiles?
for `config-default.yaml`, only one version. we use the same `config-default.yaml` for different profiles.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis commented on issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2634:
URL: https://github.com/apache/apisix/issues/2634#issuecomment-723139193
> But when i use the apisix version 2.0 and profile is dev. when apisix start, it required config-default-dev.yaml.
let us fix it, I think that is a bug.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #2634:
URL: https://github.com/apache/apisix/issues/2634#issuecomment-722179597
@membphis
Should we use the same `config-default.yaml` for different profiles?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] griffenliu commented on issue #2634: I don't want to set up different config-default.yaml for different environments
Posted by GitBox <gi...@apache.org>.
griffenliu commented on issue #2634:
URL: https://github.com/apache/apisix/issues/2634#issuecomment-722917462
> > @membphis
> > Should we use the same `config-default.yaml` for different profiles?
>
> for `config-default.yaml`, only one version. we use the same `config-default.yaml` for different profiles.
But when i use the apisix version 2.0 and profile is dev. when apisix start, it required config-default-dev.yaml.
```
local function read_yaml_conf()
local profile = require("apisix.core.profile")
profile.apisix_home = apisix_home .. "/"
local local_conf_path = profile:yaml_path("config-default")
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org