This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 408be40f5 [Bug] User-defined ingress causes incorrect flinkRestUrl
(#4205)
408be40f5 is described below
commit 408be40f5bade0edbd2a304e65b89b09fc76f5b1
Author: Happy-shi <[email protected]>
AuthorDate: Wed Mar 19 14:43:11 2025 +0800
[Bug] User-defined ingress causes incorrect flinkRestUrl (#4205)
---
.../streampark/flink/kubernetes/ingress/IngressStrategyV1.scala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategyV1.scala
b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategyV1.scala
index 164a18024..48f9d647b 100644
---
a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategyV1.scala
+++
b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategyV1.scala
@@ -45,7 +45,10 @@ class IngressStrategyV1 extends IngressStrategy {
Option(ingress)
.map(ingress => ingress.getSpec.getRules.head)
.map(rule => rule.getHost -> rule.getHttp.getPaths.head.getPath)
- .map { case (host, path) => s"http://$host$path" }
+ .map { case (host, path) =>
+ val newPath =
Option(path).filter(_.nonEmpty).map(_.replaceAll("\\/+$", "")).getOrElse("")
+ s"http://$host$newPath"
+ }
.getOrElse(clusterClient.autoClose(_.getWebInterfaceURL))
case None => clusterClient.autoClose(_.getWebInterfaceURL)
}