You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/10/09 11:53:25 UTC

[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #3597: Engine should prefer to use ip for registering on K8s cluster mode

pan3793 commented on code in PR #3597:
URL: https://github.com/apache/incubator-kyuubi/pull/3597#discussion_r990778643


##########
kyuubi-common/src/main/scala/org/apache/kyuubi/Utils.scala:
##########
@@ -329,4 +329,6 @@ object Utils extends Logging {
    */
   def getContextOrKyuubiClassLoader: ClassLoader =
     Option(Thread.currentThread().getContextClassLoader).getOrElse(getKyuubiClassLoader)
+
+  def isOnK8s: Boolean = Files.exists(Paths.get("/var/run/secrets/kubernetes.io"))

Review Comment:
   the solution is found at https://stackoverflow.com/a/49045575, and got confirmed by our internal K8s team. but I don't if there is an official recommended way to do that.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org