|
12 | 12 | */
|
13 | 13 | package io.kubernetes.client.util;
|
14 | 14 |
|
| 15 | +import static io.kubernetes.client.util.Config.ENV_KUBECONFIG; |
| 16 | +import static io.kubernetes.client.util.Config.ENV_SERVICE_HOST; |
| 17 | +import static io.kubernetes.client.util.Config.ENV_SERVICE_PORT; |
| 18 | +import static io.kubernetes.client.util.Config.SERVICEACCOUNT_CA_PATH; |
| 19 | +import static io.kubernetes.client.util.Config.SERVICEACCOUNT_TOKEN_PATH; |
| 20 | +import static io.kubernetes.client.util.KubeConfig.ENV_HOME; |
| 21 | +import static io.kubernetes.client.util.KubeConfig.KUBECONFIG; |
| 22 | +import static io.kubernetes.client.util.KubeConfig.KUBEDIR; |
| 23 | + |
15 | 24 | import io.kubernetes.client.openapi.ApiClient;
|
16 | 25 | import io.kubernetes.client.openapi.ApiException;
|
17 | 26 | import io.kubernetes.client.openapi.models.V1CertificateSigningRequest;
|
|
21 | 30 | import io.kubernetes.client.util.credentials.KubeconfigAuthentication;
|
22 | 31 | import io.kubernetes.client.util.credentials.TokenFileAuthentication;
|
23 | 32 | import io.kubernetes.client.util.exception.CSRNotApprovedException;
|
24 |
| -import okhttp3.Protocol; |
25 |
| -import org.apache.commons.compress.utils.IOUtils; |
26 |
| -import org.slf4j.Logger; |
27 |
| -import org.slf4j.LoggerFactory; |
28 |
| - |
29 | 33 | import java.io.BufferedReader;
|
30 | 34 | import java.io.ByteArrayInputStream;
|
31 | 35 | import java.io.File;
|
|
44 | 48 | import java.time.Duration;
|
45 | 49 | import java.util.Arrays;
|
46 | 50 | import java.util.List;
|
47 |
| - |
48 |
| -import static io.kubernetes.client.util.Config.ENV_KUBECONFIG; |
49 |
| -import static io.kubernetes.client.util.Config.ENV_SERVICE_HOST; |
50 |
| -import static io.kubernetes.client.util.Config.ENV_SERVICE_PORT; |
51 |
| -import static io.kubernetes.client.util.Config.SERVICEACCOUNT_CA_PATH; |
52 |
| -import static io.kubernetes.client.util.Config.SERVICEACCOUNT_TOKEN_PATH; |
53 |
| -import static io.kubernetes.client.util.KubeConfig.ENV_HOME; |
54 |
| -import static io.kubernetes.client.util.KubeConfig.KUBECONFIG; |
55 |
| -import static io.kubernetes.client.util.KubeConfig.KUBEDIR; |
| 51 | +import okhttp3.Protocol; |
| 52 | +import org.apache.commons.compress.utils.IOUtils; |
| 53 | +import org.slf4j.Logger; |
| 54 | +import org.slf4j.LoggerFactory; |
56 | 55 |
|
57 | 56 | /** A Builder which allows the construction of {@link ApiClient}s in a fluent fashion. */
|
58 | 57 | public class ClientBuilder {
|
@@ -411,8 +410,13 @@ public ApiClient build() {
|
411 | 410 | final ApiClient client = new ApiClient();
|
412 | 411 |
|
413 | 412 | client.setHttpClient(
|
414 |
| - client.getHttpClient().newBuilder().protocols(protocols).readTimeout(this.readTimeout) |
415 |
| - .pingInterval(pingInterval).build()); |
| 413 | + client |
| 414 | + .getHttpClient() |
| 415 | + .newBuilder() |
| 416 | + .protocols(protocols) |
| 417 | + .readTimeout(this.readTimeout) |
| 418 | + .pingInterval(pingInterval) |
| 419 | + .build()); |
416 | 420 |
|
417 | 421 | if (basePath != null) {
|
418 | 422 | if (basePath.endsWith("/")) {
|
|
0 commit comments