-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Non-daemon threads prevents application from stopping #6464
Comments
Workaround - create custom
and then create client like this:
After this everything fine. |
Have you tried using a different HttpClient implementation like Vert.x (io.fabric8:kubernetes-httpclient-vertx) or Jetty (io.fabric8:kubernetes-httpclient-jetty)? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Seems like kubernetes-client uses non-daemon threads under the hood. This prevents application from being closed.
Essentially, in spring boot framework, there possibility to create beans and if beans has method
close
it will be automatically closed by framework as soon, as application start to shutdown. But when you use non daemon threads - it's never happen.Please switch to usage of daemon threads, so they will not stop application from shutdown. This helps to use this client in more comfortable way.
Fabric8 Kubernetes Client version
6.13.4
Steps to reproduce
Create spring application with
configuration
class like this:Run app and see that it not stopping.
Expected behavior
Application not blocked from stopping.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3@latest
Environment
Linux
Fabric8 Kubernetes Client Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: