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

Deprecate path support in secrets and config

Open spencergibb opened this issue 5 years ago • 5 comments

You can use boot config location for config maps as files and the new support for key/value files.

spencergibb avatar Sep 14 '20 14:09 spencergibb

reference: https://spring.io/blog/2020/08/14/config-file-processing-in-spring-boot-2-4

nothing happens with using spring.config.import=configtree:.... Same as reported issue https://github.com/spring-projects/spring-boot/issues/23232

Haybu avatar Oct 05 '20 14:10 Haybu

So we deprecated path support, what about POLLING and EVENT based reload? That is, reload without configuration watcher.

I am asking because if we remove path support, reload without configuration watcher will not work. What I mean:

  • someone was using paths support + reload without configuration watcher
  • everything was working just fine for them
  • we now encourage them to use spring.config.import and suppose they switch
  • their reload now does not work.

This happens because our process of detecting changes does not care about spring.config.import sources of any type.


Now, if that is something we need to "fix" or not depends on the simple fact if we want to support POLLING and EVENT based reloads (again, something you could achieve without configuration watcher image) in the next major release.

  • if the answer is no, we can deprecate it now and add proper warnings in the code (just like we did for path support)
  • in the next major release, we remove everything related to: path support + reload without configuration watcher.

If we want to support reload (with spring.config.import) without configuration watcher, then it needs to be fixed.

@ryanjbaxter I hope I am making sense. I was really trying to remove paths support in a separate PR and integration tests started failing, so this is how I came to the above.

wind57 avatar May 09 '23 18:05 wind57

Yes, if they want the reload functionality they would have to use the configuration watcher, so yes reload using path would be deprecated as well (but to me this implied in the fact that path support is deprecated)

ryanjbaxter avatar May 09 '23 18:05 ryanjbaxter

let me confirm then. In the next major release, we remove:

  • path support
  • polling support
  • event based support
  • the only way to reload will be via configuration watcher.

Please correct me if I'm wrong.

wind57 avatar May 09 '23 18:05 wind57

Right but only the path configuration. If you are specifying configmaps/secrets without mounting them as volumes reload support continues to work as is.

ryanjbaxter avatar May 09 '23 18:05 ryanjbaxter