Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider making the Service Bindings support part of Spring Boot #43882

Open
ThomasVitale opened this issue Jan 20, 2025 · 0 comments
Open

Consider making the Service Bindings support part of Spring Boot #43882

ThomasVitale opened this issue Jan 20, 2025 · 0 comments
Labels
for: team-meeting An issue we'd like to discuss as a team to make progress status: waiting-for-triage An issue we've not yet triaged

Comments

@ThomasVitale
Copy link

The Spring Cloud Bindings library is very convenient for setting Spring Boot properties automatically from Kubernetes Secrets following the Kubernetes Service Binding API.

It's also conveniently added to the Paketo Buildpacks for Java out-of-the-box, when containerizing a Spring Boot application, though that might make it less straightforward to control in terms of versions and compatibility.

The Spring Cloud Bindings library is stricly related to Spring Boot, and sometimes it's not in sync with the latest Spring Boot versions whenever configuration properties are refactored. For example, that happened after Spring Boot 3 was released. I can imagine that it might take some extra maintenance to keep things in sync, while also trying to make it backward-compatible (especially considering the automatic inclusion in Buildpacks-generated container images). Furthermore, the release lifecycle is different, so it might delay upgrading to the latest Spring Boot version if the Spring Cloud Bindings project hasn't released support for it.

Since the only dependency the library has is on Spring Boot (no Spring Cloud dependency), and given the strict correlation with a given Spring Boot version, I would like to suggest considering including that small library into the Spring Boot project, while also simplifying its configuration.

Besides the benefits in terms of maintenance, testing and compatibility, having the Binding API available in Spring Boot would also simplify providing extensions from other Spring projects. For example, I contributed support for Service Bindings to the Spring AI project (see https://docs.spring.io/spring-ai/reference/api/cloud-bindings.html). It's based on Spring Cloud Bindings, but it's part of the Spring AI project itself. So, it's straightforward to maintain whenever there are property changes, and the compatibility is very clear since it's versioned and released together with the rest of the Spring AI artifacts. Still, this behavior might be a bit confusing since this strategy is not applied to other projects in the Spring portfolio. If the Binding API was available in Spring Boot itself, it would be possible to include the binding support as part of the main autoconfiguration, without requiring additional dependencies/configuration startegies.

Relates to #21322

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 20, 2025
quaff added a commit to quaff/spring-boot that referenced this issue Jan 21, 2025
@philwebb philwebb added the for: team-meeting An issue we'd like to discuss as a team to make progress label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: team-meeting An issue we'd like to discuss as a team to make progress status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants