Skip to content

Commit

Permalink
Use 2.8.8 compatible Jackson API (#4930)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiview authored Jan 17, 2022
1 parent f7dcfa8 commit 19b58cd
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ protected void containerIsStarted(InspectContainerResponse containerInfo) {
is -> objectMapper.readValue(is, ObjectNode.class)
);

ObjectNode clusterConfig = rawKubeConfig.at("/clusters/0/cluster").require();
JsonNode clusterNode = rawKubeConfig.at("/clusters/0/cluster");
if (!clusterNode.isObject()) {
throw new IllegalStateException("'/clusters/0/cluster' expected to be an object");
}
ObjectNode clusterConfig = (ObjectNode) clusterNode;

clusterConfig.replace("server", new TextNode("https://" + this.getHost() + ":" + this.getMappedPort(6443)));

rawKubeConfig.set("current-context", new TextNode("default"));
Expand Down

0 comments on commit 19b58cd

Please sign in to comment.