You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2024/09/09 05:49:37 UTC

(incubator-streampark) branch dev-2.1.5 updated: [Improve] ingress url minor improvement

This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev-2.1.5
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev-2.1.5 by this push:
     new ce6119ec9 [Improve] ingress url minor improvement
ce6119ec9 is described below

commit ce6119ec94a52795e0fc845111ab125b71f19316
Author: benjobs <be...@apache.org>
AuthorDate: Mon Sep 9 13:49:24 2024 +0800

    [Improve] ingress url minor improvement
---
 .../apache/streampark/flink/kubernetes/ingress/IngressStrategyV1.scala  | 2 +-
 .../streampark/flink/kubernetes/ingress/IngressStrategyV1beta1.scala    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 a54216d6a..c9a98a92c 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,7 @@ 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) => s"http://$host${path.replaceAll("/$", "")}" }
               .getOrElse {
                 Utils.using(clusterClient)(client => client.getWebInterfaceURL)
               }
diff --git a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategyV1beta1.scala b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategyV1beta1.scala
index 20ffdab8d..f2d14cb37 100644
--- a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategyV1beta1.scala
+++ b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategyV1beta1.scala
@@ -47,7 +47,7 @@ class IngressStrategyV1beta1 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) => s"http://$host${path.replaceAll("/$", "")}" }
               .getOrElse {
                 Utils.using(clusterClient)(client => client.getWebInterfaceURL)
               }