Skip to content

Commit 408be40

Browse files
authored
[Bug] User-defined ingress causes incorrect flinkRestUrl (#4205)
1 parent 4aa7526 commit 408be40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategyV1.scala

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ class IngressStrategyV1 extends IngressStrategy {
4545
Option(ingress)
4646
.map(ingress => ingress.getSpec.getRules.head)
4747
.map(rule => rule.getHost -> rule.getHttp.getPaths.head.getPath)
48-
.map { case (host, path) => s"http://$host$path" }
48+
.map { case (host, path) =>
49+
val newPath = Option(path).filter(_.nonEmpty).map(_.replaceAll("\\/+$", "")).getOrElse("")
50+
s"http://$host$newPath"
51+
}
4952
.getOrElse(clusterClient.autoClose(_.getWebInterfaceURL))
5053
case None => clusterClient.autoClose(_.getWebInterfaceURL)
5154
}

0 commit comments

Comments
 (0)