Intercept kubernetes warnings #7060
-
Hi y'all, I would like to catch warnings returned by k8s. Those are by default ignored, only exceptions are thrown. I assume I have to override the httpClient and do something with warning headers, however, I can't figure out how to do such implementation. I'm using latest and greatest, 7.2.0, so the default is the vert.x httpClient. Can one provide a code snippet how to implement this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@manusa can you provide any help 🙏 |
Beta Was this translation helpful? Give feedback.
-
you should look at interceptors for that. Check any of the Interceptors we have in the repository to get an understanding of how they work, although it's quite straightforward. You can then use this interceptor by setting it in the Kubernetes builder. |
Beta Was this translation helpful? Give feedback.
Interceptors are agnostic to the HttpClient implementation you're using.
So yes, they should get called regardless of using Vert.x, OkHTTP, or any other.