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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to