GoogleCloudPlatform / GoogleCloudPlatform/spring-cloud-gcp
spring-cloud-gcp-starter-config refresh on change
- Dominant language
- Java
- Stars
- 551
- Forks
- 349
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Description
Runtime configuration is fetched only on startup, or manually (say via Spring Boot's `actuator/refresh`).
It would be nice to have a functionality that would update the properties when a change is detected.
The easiest approach would be to have a CRON job that checks if anything had changed, and if it has invoke the Spring Context refresh (or some other mechanism).
This command can be used in a timestamp approach to checking if something has changed.
```shell
gcloud beta runtime-config configs variables list --config-name=my-app_dev --limit=1 --page-size=1 --sort-by=~UPDATE_TIME
```
Perhaps [watch](https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/watch) could be used in some manner.
The main problem with `spring-cloud-gcp-starter-config` is that it is using a pull, and not poll.
Even worse, when trying to implement say a push mechanism, Cloud Run does not make it easy to invoke it on all instances at once.
Contributor guide
Assessment
This issue has not been assessed yet.