Skip to content

Add support for wildcard locations for properties and YAML files #19909

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

Closed
wilkinsona opened this issue Jan 24, 2020 · 3 comments
Closed

Add support for wildcard locations for properties and YAML files #19909

wilkinsona opened this issue Jan 24, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@wilkinsona
Copy link
Member

No description provided.

@wilkinsona wilkinsona added this to the 2.3.x milestone Jan 24, 2020
@scottfrederick scottfrederick changed the title Add support for creating property sources from config maps Add support for creating property sources from Kubernetes ConfigMaps Jan 24, 2020
@spencergibb
Copy link
Member

I assume reading from the filesystem not using k8s api, correct?

@scottfrederick
Copy link
Contributor

I assume reading from the filesystem not using k8s api

Yes, consuming ConfigMaps mounted on the container filesystem using volume mounts.

@wilkinsona wilkinsona changed the title Add support for creating property sources from Kubernetes ConfigMaps Add support for creating property sources from volume-mounted Kubernetes ConfigMaps Jan 25, 2020
@mbhave
Copy link
Contributor

mbhave commented Jan 28, 2020

We discussed this a bit and it seems like adding a new property source isn't necessary. Here are some things we talked about:

  • If the config map results in an application.properties file and you mount it in a config/ directory next to the app, it’ll just work without us doing anything at all.

  • If it's mounted at a different location, that location can be changed by setting the SPRING_CONFIG_LOCATION environment variable.

  • If you have, let's say both redis configuration and some MySQL configuration, that could end up in config/mysql/application.properties and config/redis/application.properties. @dsyer had once suggested that the ConfigFileApplicationListener could support wildcards.

We've decided to go with the wildcard enhancement and documentation updates as part of this issue.

@mbhave mbhave changed the title Add support for creating property sources from volume-mounted Kubernetes ConfigMaps Add support for wildcard locations for properties and YAML files Jan 30, 2020
@mbhave mbhave closed this as completed in e64a145 Feb 3, 2020
@mbhave mbhave modified the milestones: 2.3.x, 2.3.0.M2 Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants