You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "senlizishi (via GitHub)" <gi...@apache.org> on 2023/04/03 06:29:36 UTC
[GitHub] [incubator-streampark] senlizishi commented on issue #2553: [Bug] Ingress Metadata cannot obtain the 'field. title. io/publicEndpoints' annotation
senlizishi commented on issue #2553:
URL: https://github.com/apache/incubator-streampark/issues/2553#issuecomment-1493742679
@Al-assad As you said, after reviewing some information, I found that `field.cattle.io/publicEndpoints` annotation is related to the 'Rancher address provider'.But I don't have the Rancher platform for testing, so I'm not sure if it's really what I think :sweat_smile: .
I suggest modifying it as follows:
```scala
try {
val client = new DefaultKubernetesClient
val ingress = client.network.ingress.inNamespace(nameSpace).withName(clusterId).get
val rules = ingress.getSpec.getRules
val hostname = rules.get(0).getHost
val path = rules.get(0).getHttp.getPaths.get(0).getPath
logger.info(s"Retrieve flink cluster $clusterId successfully, JobManager Web Interface: https://$hostname$path")
s"https://$hostname$path"
} catch {
case e: Exception => throw new RuntimeException("[StreamPark] get ingressUrlAddress error.", e)
}
```
Use the above method instead of the old way of getting information from annotations, which will be more general. What do you think of this plan ?
--
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