You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "Al-assad (via GitHub)" <gi...@apache.org> on 2023/04/07 09:52:05 UTC

[GitHub] [incubator-streampark] Al-assad commented on a diff in pull request #2584: [Fix] More comprehensive acquisition of Flink-K8s Ingress public endpoints

Al-assad commented on code in PR #2584:
URL: https://github.com/apache/incubator-streampark/pull/2584#discussion_r1160592286


##########
streampark-flink/streampark-flink-kubernetes/src/main/scala/org/apache/streampark/flink/kubernetes/IngressController.scala:
##########
@@ -122,17 +122,18 @@ object IngressController extends Logger {
   def ingressUrlAddress(nameSpace: String, clusterId: String, clusterClient: ClusterClient[_]): String = {
     if (determineIfIngressExists(nameSpace, clusterId)) {
       val client = new DefaultKubernetesClient
-      val ingress = client.network.ingress.inNamespace(nameSpace).withName(clusterId).get
-      val publicEndpoints = ingress.getMetadata.getAnnotations.get("field.cattle.io/publicEndpoints")
-      IngressMeta.as(publicEndpoints) match {
-        case Some(metas) =>
-          val ingressMeta = metas.head
-          val hostname = ingressMeta.hostname
-          val path = ingressMeta.path
-          logger.info(s"Retrieve flink cluster $clusterId successfully, JobManager Web Interface: https://$hostname$path")
-          s"https://$hostname$path"
-        case None => throw new RuntimeException("[StreamPark] get ingressUrlAddress error.")
-      }
+      // for kubernetes 1.22+

Review Comment:
   This logic should be implemented as a part of the entire `ingressUrlAddress` function , as it has already completed the check for the existence of k8s-ingress for the specified flink identifier.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org