Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] k8s ingressClass configuration is not effective #3343

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading