Skip to content
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

Http client configuration for kubernetes openapi client #839

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

msupic
Copy link
Contributor

@msupic msupic commented Feb 12, 2025

@graemerocher @yawkat - I closed the previous and created a new PR for kubernetes http client configuration. We can't use ServiceHttpClientConfiguration for kubernetes client since it doesn't have @BootstrapContextCompatible annotation, so I created a new http client config class: KubernetesHttpClientConfiguration. The new class uses the following managed beans if those were created, otherwise creates new ones:

  • DefaultConnectionPoolConfiguration
  • DefaultWebSocketCompressionConfiguration
  • DefaultHttp2ClientConfiguration
  • ClientSslConfiguration

So all those config settings will be the same as for other http clients. So only properties from HttpClientConfiguration class can be customized for kubernetes http client comparing to other http clients since we need to set request timeouts for streaming on the following way:

        Optional<Duration> readTimeout = kubernetesHttpClientConfiguration.getReadTimeout();
        if (readTimeout.isPresent()) {
            kubernetesHttpClientConfiguration.setRequestTimeout(readTimeout.get().plusSeconds(1));
            kubernetesHttpClientConfiguration.setReadTimeout(Duration.ZERO);
        }

Does this seem ok to you?

@msupic msupic merged commit c944a7c into 6.3.x Feb 12, 2025
28 checks passed
@msupic msupic deleted the kubernetes-client-configuration branch February 12, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants