Skip to content

Commit

Permalink
deps: bump Kubernetes Client to 6.6.1
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed May 11, 2023
1 parent 0531aad commit fa9674e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Usage:
### 1.13-SNAPSHOT
* Fix #1478: Should detect and warn the user if creating ingress and ingress controller not available
* Fix #2150: Bump Kubernetes Client to 6.6.0 (fixes issues when trace-logging OpenShift builds)
* Fix #2162: Bump Kubernetes Client to 6.6.1 (HttpClient with support for PUT + InputStream)

### 1.12.0 (2023-04-03)
* Fix #1179: Move storageClass related functionality out of VolumePermissionEnricher to PersistentVolumeClaimStorageClassEnricher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


import java.net.UnknownHostException;
import java.util.Optional;

import org.eclipse.jkube.kit.common.KitLogger;
import org.eclipse.jkube.kit.common.util.OpenshiftHelper;
Expand Down Expand Up @@ -55,8 +56,9 @@ public boolean isOpenShift() {
return OpenshiftHelper.isOpenShift(client);
} catch (KubernetesClientException exp) {
Throwable cause = exp.getCause();
String prefix = cause instanceof UnknownHostException ? "Unknown host " : "";
kitLogger.warn("Cannot access cluster for detecting mode: %s%s",
String prefix = cause instanceof UnknownHostException ?
"Unknown host" : Optional.ofNullable(cause).map(Object::getClass).map(Class::getSimpleName).orElse("");
kitLogger.warn("Cannot access cluster for detecting mode: %s %s",
prefix,
cause != null && cause.getMessage() != null ? cause.getMessage() : exp.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void isOpenShiftThrowsExceptionShouldReturnFalse() {
// Then
assertThat(result).isFalse();
verify(logger, times(1))
.warn(startsWith("Cannot access cluster for detecting mode"), eq(""), eq("An error has occurred."));
.warn(startsWith("Cannot access cluster for detecting mode"), eq("IOException"), eq("unknown.example.com"));
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<version.jmockit>1.49</version.jmockit>
<version.json-smart>2.4.10</version.json-smart> <!-- Transitive dependency required by citrus -->
<version.junit5>5.9.2</version.junit5>
<version.kubernetes-client>6.6.0</version.kubernetes-client>
<version.kubernetes-client>6.6.1</version.kubernetes-client>
<version.license-maven-plugin>4.2</version.license-maven-plugin>
<version.lombok-maven-plugin>1.18.20.0</version.lombok-maven-plugin>
<version.maven-compiler-plugin>3.8.1</version.maven-compiler-plugin>
Expand Down

0 comments on commit fa9674e

Please sign in to comment.