spring-cloud / spring-cloud/spring-cloud-config
Add feature to watch config directory for file changes and refresh components marked with @RefreshScope
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
I'd like to be able to watch config files for changes and use a ContextRefresher to reload any config components marked with @RefreshScope. This would make it possible to have the application get updated with new values from configMaps or secrets mounted as files when using Kubernetes. We would need to provide a directory like /config that should be watched for file changes to any files in that directory. When change is detected the refresh() method on a ContextRefresher could be called.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ContextRefresher and its refresh() entry point described in the issue, then trace how @RefreshScope components are refreshed. Define how a configurable directory such as /config is watched for file changes, including Kubernetes-mounted configMaps or secrets, and verify that changes trigger the refresh behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kubernetes, spring, spring-boot
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100