spring-cloud / spring-cloud/spring-cloud-config

Add feature to watch config directory for file changes and refresh components marked with @RefreshScope

Open
#1,439 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.