Skip to content

Commit

Permalink
fix scala bug in IngressStrategy#buildIngressAnnotations (#3343)
Browse files Browse the repository at this point in the history
Co-authored-by: pan <[email protected]>
  • Loading branch information
Panpannn and pan authored Nov 15, 2023
1 parent cafdad1 commit 1c21037
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 1c21037

Please sign in to comment.