diff --git a/dinky-gateway/src/main/java/org/dinky/gateway/config/K8sConfig.java b/dinky-gateway/src/main/java/org/dinky/gateway/config/K8sConfig.java index a5dc20d995..b7cec39481 100644 --- a/dinky-gateway/src/main/java/org/dinky/gateway/config/K8sConfig.java +++ b/dinky-gateway/src/main/java/org/dinky/gateway/config/K8sConfig.java @@ -75,5 +75,5 @@ public class K8sConfig { dataType = "Map", example = "{\"key1\": \"value1\", \"key2\": \"value2\"}", notes = "Ingress configuration properties") - private Map ingressConfig = Maps.newHashMap(); + private Map ingressConfig = Maps.newHashMap(); } diff --git a/dinky-gateway/src/main/java/org/dinky/gateway/kubernetes/KubernetesApplicationGateway.java b/dinky-gateway/src/main/java/org/dinky/gateway/kubernetes/KubernetesApplicationGateway.java index 3132fea281..3aa802ae4a 100644 --- a/dinky-gateway/src/main/java/org/dinky/gateway/kubernetes/KubernetesApplicationGateway.java +++ b/dinky-gateway/src/main/java/org/dinky/gateway/kubernetes/KubernetesApplicationGateway.java @@ -363,11 +363,14 @@ private String getIngressUrl(Ingress ingress, String namespace, String clusterId * @return ingress domain */ private String checkUseIngress() { - Map ingressConfig = k8sConfig.getIngressConfig(); + Map ingressConfig = k8sConfig.getIngressConfig(); if (MapUtils.isNotEmpty(ingressConfig)) { - boolean ingressEnable = - Boolean.parseBoolean(ingressConfig.getOrDefault(DINKY_K8S_INGRESS_ENABLED_KEY, "false")); - String ingressDomain = ingressConfig.getOrDefault(DINKY_K8S_INGRESS_DOMAIN_KEY, StringUtils.EMPTY); + boolean ingressEnable = Boolean.parseBoolean(ingressConfig + .getOrDefault(DINKY_K8S_INGRESS_ENABLED_KEY, "false") + .toString()); + String ingressDomain = ingressConfig + .getOrDefault(DINKY_K8S_INGRESS_DOMAIN_KEY, StringUtils.EMPTY) + .toString(); if (ingressEnable && StringUtils.isNotEmpty(ingressDomain)) { return ingressDomain; }