Skip to content

Commit

Permalink
Explicit External IP check in Kubernetes Discovery Plugin [CN-296]
Browse files Browse the repository at this point in the history
  • Loading branch information
semihbkgr committed Dec 15, 2023
1 parent 4c9cd6a commit f63f7fa
Show file tree
Hide file tree
Showing 4 changed files with 353 additions and 202 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ default Integer extractPort(JsonValue subsetJson) {
}
if (ports.size() == 1) {
JsonValue port = ports.get(0);
return port.asObject().get("port").asInt();
JsonValue servicePort = port.asObject().get("port");
if (servicePort != null && servicePort.isNumber()) {
return servicePort.asInt();
}
}
return null;
}
Expand Down
Loading

0 comments on commit f63f7fa

Please sign in to comment.