File tree Expand file tree Collapse file tree
main/java/io/github/kubesys/client
test/java/io/github/kubesys/client/install/stack Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66 <groupId >io.github.kubesys</groupId >
77 <artifactId >client-java</artifactId >
8- <version >1.0.3 </version >
8+ <version >1.0.4 </version >
99 <packaging >jar</packaging >
1010
1111 <name >client-java</name >
Original file line number Diff line number Diff line change 5858
5959import com .fasterxml .jackson .databind .JsonNode ;
6060import com .fasterxml .jackson .databind .ObjectMapper ;
61+ import com .fasterxml .jackson .databind .SerializationFeature ;
6162import com .fasterxml .jackson .databind .node .ArrayNode ;
6263import com .fasterxml .jackson .databind .node .ObjectNode ;
6364import com .fasterxml .jackson .dataformat .yaml .YAMLFactory ;
@@ -1617,15 +1618,20 @@ protected synchronized JsonNode parseResponse(CloseableHttpResponse response) {
16171618 switch (response .getCode ()) {
16181619 case 200 :
16191620 try {
1620- return new ObjectMapper ().readTree (response .getEntity ().getContent ());
1621+ ObjectMapper objectMapper = new ObjectMapper ();
1622+ objectMapper .disable (SerializationFeature .FAIL_ON_EMPTY_BEANS );
1623+ return objectMapper .readTree (response .getEntity ().getContent ());
16211624 } catch (Exception e ) {
16221625 throw new KubernetesUnknownException (e .toString ());
16231626 }
1624- // if (result.has("status") && result.get("status").asText().equals("Failure")) {
1625- // int code = result.get("code").asInt();
1626- // String cause = statusDesc.get(code);
1627- // throw new Exception(cause != null ? cause : result.toPrettyString());
1628- // }
1627+ case 201 :
1628+ try {
1629+ ObjectMapper objectMapper = new ObjectMapper ();
1630+ objectMapper .disable (SerializationFeature .FAIL_ON_EMPTY_BEANS );
1631+ return objectMapper .readTree (response .getEntity ().getContent ());
1632+ } catch (Exception e ) {
1633+ throw new KubernetesUnknownException (e .toString ());
1634+ }
16291635 case 400 :
16301636 throw new KubernetesBadRequestException (response .toString ());
16311637 case 401 :
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public static void main(String[] args) throws Exception {
5252 new Env ("RABBITMQ_DEFAULT_PASS" , new ValueFrom (
5353 new SecretKeyRef (NAME , StackCommon .CONFIG_PASSWORD )))},
5454 new Port [] {
55+ new Port (15674 ),
5556 new Port (15672 ),
5657 new Port (5672 )
5758 },
@@ -65,6 +66,7 @@ public static void main(String[] args) throws Exception {
6566 service .withType ("NodePort" ).withSelector (NAME )
6667 .withPort (15672 , 30305 , "management" )
6768 .withPort (5672 , 30304 , "rabbitmq" )
69+ .withPort (15674 , 30303 , "web" )
6870 .stream (System .out );
6971 }
7072}
You can’t perform that action at this time.
0 commit comments