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

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


The following commit(s) were added to refs/heads/dev-2.1.2 by this push:
     new 1c21037f6 fix scala bug in IngressStrategy#buildIngressAnnotations 
(#3343)
1c21037f6 is described below

commit 1c21037f6c142ed367be88b2b3dc28660363f7fd
Author: Panpannn <[email protected]>
AuthorDate: Wed Nov 15 21:54:24 2023 +0800

    fix scala bug in IngressStrategy#buildIngressAnnotations (#3343)
    
    Co-authored-by: pan <[email protected]>
---
 .../apache/streampark/flink/kubernetes/ingress/IngressStrategy.scala  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategy.scala
 
b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategy.scala
index 5cd51e8f3..f116a6eda 100644
--- 
a/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategy.scala
+++ 
b/streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/ingress/IngressStrategy.scala
@@ -48,14 +48,14 @@ trait IngressStrategy {
   }
 
   def buildIngressAnnotations(clusterId: String, namespace: String): 
Map[String, String] = {
-    val annotations = Map(
+    var annotations = Map(
       "nginx.ingress.kubernetes.io/rewrite-target" -> "/$2",
       "nginx.ingress.kubernetes.io/proxy-body-size" -> "1024m",
       "nginx.ingress.kubernetes.io/configuration-snippet" -> s"""rewrite 
^(/$clusterId)$$ $$1/ permanent; sub_filter '<base href="./">' '<base 
href="/$namespace/$clusterId/">'; sub_filter_once off;"""
     )
     val ingressClass = 
InternalConfigHolder.get[String](K8sFlinkConfig.ingressClass)
     if (ingressClass.nonEmpty) {
-      annotations + ("kubernetes.io/ingress.class" -> ingressClass)
+      annotations += ("kubernetes.io/ingress.class" -> ingressClass)
     }
     annotations
   }

Reply via email to