Skip to content

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

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

Closed
ThomasVitale opened this issue Jan 20, 2025 · 3 comments
Closed

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

ThomasVitale opened this issue Jan 20, 2025 · 3 comments
Labels
status: duplicate A duplicate of another issue

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
@salaboy
Copy link
Contributor

salaboy commented Feb 5, 2025

+100 for this

@philwebb
Copy link
Member

philwebb commented Feb 5, 2025

I really appreciate that from a user perspective this makes a lot of sense, however, I think it's going to be quite hard for us to get to it in the near-term. Our current priority is focusing on the 4.0.x release and that means we can't really take on the maintenance burden for managing spring-cloud-bindings equivalent code in Spring Boot.

Another issue with taking on the bindings code is that it may restrict what we can do for #21322. We don't want to paint ourselves into a corner if we can help it.

I'm going to close this one as a duplicate of #21322, but I'll add a comment to that issue to make sure we consider spring-cloud-bindings when we get to it.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2025
@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged for: team-meeting An issue we'd like to discuss as a team to make progress labels Feb 7, 2025
@ThomasVitale
Copy link
Author

@philwebb Thanks for your answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

5 participants