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
KubernetesClientBuilder enhancements for common HttpClient customizations #4471
Milestone
Comments
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Oct 12, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Oct 12, 2022
11 tasks
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Oct 13, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Oct 17, 2022
manusa
pushed a commit
to shawkins/kubernetes-client
that referenced
this issue
Oct 18, 2022
manusa
pushed a commit
to shawkins/kubernetes-client
that referenced
this issue
Oct 18, 2022
manusa
pushed a commit
to shawkins/kubernetes-client
that referenced
this issue
Oct 18, 2022
manusa
pushed a commit
to shawkins/kubernetes-client
that referenced
this issue
Oct 18, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's obviously not intended. There are really two issues here. The first is that there's no current way exposed for getting the default HttpClient Factory. A method for that can easily be extracted from HttpClientUtils.createHttpClient. The second is that the factory logic assumes customization via sub-classing (see the XXXClientFactory.additionalConfig methods). There wasn't a mechanism envisioned for modifying across any factory - such as modifying the interceptors in a common way.
Since we added HttpClient.getFactory, HttpClient.Builder is viable as a possible argument to KubernetesClientBuilder. To fully decompose it's also possible to change HttpClient.Factory.createHttpClient(Config config) to be HttpClient.Factory.processConfig(Config config, HttpClient.Builder).
That looks approximately like:
However it's also possible to just associate a Consumer<HttpClient.Builder> with the KubernetesClientBuilder:
That eliminates a few of the steps.
Originally posted by @shawkins in #2271 (comment)
The text was updated successfully, but these errors were encountered: