Skip to content

Conversation

@therepanic
Copy link
Contributor

Remove the BindableService bean condition from gRPC health auto-configuration. Make server-side health opt-in by default spring.grpc.server.health.enabled=false. This allows exposing the health service as the only gRPC service without starting a server unexpectedly unless enabled.

Closes: gh-334

Remove the BindableService bean condition from gRPC health
auto-configuration. Make server-side health opt-in by default
(spring.grpc.server.health.enabled=false). This allows exposing the
health service as the only gRPC service without starting a server
unexpectedly unless enabled.

Closes: spring-projectsgh-334

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
@therepanic
Copy link
Contributor Author

I will also add documentation where I will describe that server-side health in our case is disabled by default.

Explain that server-side gRPC health is disabled by default. Update
actuator health example to explicitly enable it.

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
@onobc
Copy link
Contributor

onobc commented Dec 23, 2025

👋🏻 @therepanic , thanks for the quick turnaround. However, we would like to have a team chat about this change before proceeding. We will get back w/ you shortly.

@dsyer
Copy link
Member

dsyer commented Dec 23, 2025

It's more complicated than my comment in #334 implied. We don't want the health checks to be disabled by default if there actually is a BindableService. So we need a composite condition with split logic for when there is or isn't a BindableService registered.

@therepanic
Copy link
Contributor Author

therepanic commented Dec 23, 2025

You mean it should work like this?

  • If the application has at least one BindableService, then health should be enabled by default, as before.
  • If the BindableService bean isn't registered in the application, then it should be disabled by default and only enabled if we specify it in the config?

@dsyer
Copy link
Member

dsyer commented Dec 23, 2025

Precisely

@therepanic
Copy link
Contributor Author

Okay, I'll be back soon with some polished changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Enable gRPC Health service without BindableService beans

3 participants