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

Add flag for use name as prefix #405

Open
tibistibi opened this issue Jan 27, 2023 · 2 comments
Open

Add flag for use name as prefix #405

tibistibi opened this issue Jan 27, 2023 · 2 comments

Comments

@tibistibi
Copy link

tibistibi commented Jan 27, 2023

Feature description

To use consul I have this config:

micronaut:
  application:
    name: myProject
  config-client:
    enabled: true

This will collect all key values from Consul which are in application and in myProject directory. This is cool.

But it also will collect all keys from myProject2. Which we do not want. I can imagine that this can be a handy feature. That I can have generic keys which will merge into other projects. But we have over 50 projects and we run into names which happen to start the same.

What we do now to work around this is adding a / at the end of the name. Which is a problem as profiles will not work any more. Than it will look for myProject/,profile1 instead of myProject,profile

So a solution could be that there is an option like this

micronaut:
  application:
    name: myProject
  config-client:
    enabled: true
    use-name-as-prefix: false

Which will not use the name as a prefix but only exact matches are allowed

@FrogDevelopper
Copy link
Contributor

In which version do you have this issue ?
Because #358 should fix it

@tibistibi
Copy link
Author

yes this is fixed already, thanks!

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

No branches or pull requests

2 participants