Skip to content

Commit

Permalink
[bug]fix k8s form ingresss bug (#3956)
Browse files Browse the repository at this point in the history
Co-authored-by: gaoyan1998 <[email protected]>
  • Loading branch information
gaoyan1998 and gaoyan1998 authored Nov 26, 2024
1 parent bb55f4a commit c667c5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ public class K8sConfig {
dataType = "Map<String, String>",
example = "{\"key1\": \"value1\", \"key2\": \"value2\"}",
notes = "Ingress configuration properties")
private Map<String, String> ingressConfig = Maps.newHashMap();
private Map<String, Object> ingressConfig = Maps.newHashMap();
}
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,14 @@ private String getIngressUrl(Ingress ingress, String namespace, String clusterId
* @return ingress domain
*/
private String checkUseIngress() {
Map<String, String> ingressConfig = k8sConfig.getIngressConfig();
Map<String, Object> 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;
}
Expand Down

0 comments on commit c667c5f

Please sign in to comment.