diff --git a/CHANGELOG.md b/CHANGELOG.md index 162da2f2259..6cad3d2f96c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,12 @@ ### 6.10-SNAPSHOT #### Bugs - * Fix #5580: [java-generator] Correctly handle defaults for IntOrString types * Fix #5584: Fix CRD generation when EnumMap is used * Fix #5626: Prevent memory accumulation from informer usage * Fix #5527: Unable to transfer file to pod if `/tmp` is read-only * Fix #5656: Enable EC private key usage for mTLS auth +* Fix #5694: ExecCredential doesn't fail with unsupported command output #### Improvements * Fix #5429: moved crd generator annotations to generator-annotations instead of crd-generator-api. Using generator-annotations introduces no transitive dependencies. @@ -16,6 +16,7 @@ #### Dependency Upgrade * Updated okio to version 1.17.6 to avoid CVE-2023-3635 + #### New Features * Fix #5608 Support authentication with certificate in exec-credentials diff --git a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/Config.java b/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/Config.java index b386cf91b5b..77b8ab7b0ea 100644 --- a/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/Config.java +++ b/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/Config.java @@ -823,11 +823,15 @@ protected static ExecCredential getExecCredentialFromExecConfig(ExecConfig exec, if (p.waitFor() != 0) { LOGGER.warn(output); } - ExecCredential ec = Serialization.unmarshal(output, ExecCredential.class); - if (!apiVersion.equals(ec.apiVersion)) { - LOGGER.warn("Wrong apiVersion {} vs. {}", ec.apiVersion, apiVersion); - } else { - return ec; + try { + ExecCredential ec = Serialization.unmarshal(output, ExecCredential.class); + if (!apiVersion.equals(ec.apiVersion)) { + LOGGER.warn("Wrong apiVersion {} vs. {}", ec.apiVersion, apiVersion); + } else { + return ec; + } + } catch (Exception ex) { + LOGGER.warn("Error unmarshalling ExecCredential", ex); } return null; }