8000 [ISSUE #13345] fix apiClient readTimeout must be zero by 2200376luhuabin · Pull Request #13362 · alibaba/nacos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[ISSUE #13345] fix apiClient readTimeout must be zero #13362

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

Merged
merged 3 commits into from
May 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,12 @@ public void startInformer() throws IOException {

if (k8sSyncConfig.isOutsideCluster()) {
apiClient = getOutsideApiClient();
coreV1Api = new CoreV1Api();
} else {
coreV1Api = new CoreV1Api();
apiClient = coreV1Api.getApiClient();
apiClient = ClientBuilder.cluster().build();
}
// set the global default api-client
Configuration.setDefaultApiClient(apiClient);
coreV1Api = new CoreV1Api();

OkHttpClient httpClient = apiClient.getHttpClient().newBuilder().build();
apiClient.setHttpClient(httpClient);
Expand Down Expand Up @@ -405,10 +406,10 @@ public boolean compareServicePorts(List<V1ServicePort> oldServicePorts, List<V1S
*/
public ApiClient getOutsideApiClient() throws IOException {
String kubeConfigPath = k8sSyncConfig.getKubeConfig();

// loading the out-of-cluster config, a kubeconfig from file-system
ApiClient apiClient = ClientBuilder.kubeconfig(KubeConfig.loadKubeConfig(new FileReader(kubeConfigPath))).build();

// set the global default api-client to the in-cluster one from above
Configuration.setDefaultApiClient(apiClient);
return apiClient;
Expand Down
Loading
0