spring-cloud-commons icon indicating copy to clipboard operation
spring-cloud-commons copied to clipboard

External property file change watch

Open spencergibb opened this issue 4 years ago • 6 comments

Original https://github.com/spring-cloud/spring-cloud-kubernetes/issues/190

Code should live here since it is not specific to spring cloud.

See jhipster CloudConfigRefreshService for example.

Useful for spring cloud k8s. Related #604

spencergibb avatar Sep 11 '19 14:09 spencergibb

Looks like this is related to https://github.com/spring-cloud/spring-cloud-config/issues/1439, I probably put that in the wrong project.

I did a naive implementation for a demo on k8s here: https://github.com/trisberg/mypets-app/blob/refresh-scope/src/main/java/com/springdeveloper/mypets/ConfigRefresher.java#L41

trisberg avatar Sep 19 '19 11:09 trisberg

:wave: Is there interest in implementing this? I might be able to take a swing at it.

alexbrand avatar Aug 24 '21 19:08 alexbrand

Yes please

spencergibb avatar Aug 25 '21 05:08 spencergibb

This would be a great alternative to spring-cloud-kubernetes-configuration-watcher. Get the application to the watch for config and secret changes and refresh Beans.

dkirrane avatar Jun 02 '23 09:06 dkirrane

Hey, this would be great! How this would be different from the deprecated feature? Also, where can I find any discussion about why PropertySource Reload has been deprecated. Is there any work-in-progress on this in the pre-releases?

heruan avatar Feb 15 '24 20:02 heruan

@heruan IIRC (@ryanjbaxter?), the default mode for reload required k8s API access. spring-cloud-kubernetes-configuration-watcher is the preferred replacement. This would replace the polling option of reload. Watch to see the assignment to a Project or milestone, otherwise no work will have been done.

spencergibb avatar Feb 15 '24 20:02 spencergibb