build: Upgrade kubernetes client to latest stable version 5.6.0 (#60)

pull/71/head
Sergii Kabashniuk 2021-07-30 11:58:11 +03:00 committed by GitHub
parent ccb8e4b63e
commit 813218455a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 4 deletions

View File

@ -20,7 +20,6 @@ import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.utils.HttpClientUtils;
import io.fabric8.kubernetes.client.utils.ImpersonatorInterceptor;
import io.fabric8.kubernetes.client.utils.Utils;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import javax.inject.Inject;
@ -126,7 +125,23 @@ public class KubernetesClientFactory {
connectionPool.evictAll();
}
Utils.shutdownExecutorService(executorService);
if (executorService != null && !executorService.isShutdown()) {
executorService.shutdown();
try {
Logger logger = LoggerFactory.getLogger(getClass());
logger.debug("Shutdown kubernetes client threads pool, wait 30s to stop normally");
if (!executorService.awaitTermination(30, TimeUnit.SECONDS)) {
executorService.shutdownNow();
logger.debug("Interrupt kubernetes client threads pool, wait 60s to stop");
if (!executorService.awaitTermination(60, TimeUnit.SECONDS)) {
logger.error("Couldn't shutdown kubernetes client threads pool");
}
}
} catch (InterruptedException x) {
executorService.shutdownNow();
Thread.currentThread().interrupt();
}
}
}
/** Retrieves the {@link OkHttpClient} instance shared by all Kubernetes clients. */

View File

@ -86,7 +86,7 @@ public class FileSecretApplier extends KubernetesSecretApplier<KubernetesEnviron
.withName(secret.getMetadata().getName())
.withSecret(
new SecretVolumeSourceBuilder()
.withNewSecretName(secret.getMetadata().getName())
.withSecretName(secret.getMetadata().getName())
.build())
.build();

View File

@ -72,7 +72,7 @@
<commons-lang.version>2.6</commons-lang.version>
<integration.mysql.db.image>quay.io/eclipse/che--centos--mysql-57-centos7:latest-e08ee4d43b7356607685b69bde6335e27cf20c020f345b6c6c59400183882764</integration.mysql.db.image>
<integration.postgresql.db.image>quay.io/eclipse/che--centos--postgresql-96-centos7:9.6-b681d78125361519180a6ac05242c296f8906c11eab7e207b5ca9a89b6344392</integration.postgresql.db.image>
<io.fabric8.kubernetes-client>5.4.1</io.fabric8.kubernetes-client>
<io.fabric8.kubernetes-client>5.6.0</io.fabric8.kubernetes-client>
<io.github.mweirauch.micrometer-jvm-extras.version>0.1.3</io.github.mweirauch.micrometer-jvm-extras.version>
<io.jaegertracing.micrometer.version>1.0.0</io.jaegertracing.micrometer.version>
<io.jaegertracing.version>1.0.0</io.jaegertracing.version>