in discovery-kubernetes-api/src/main/scala/org/apache/pekko/discovery/kubernetes/KubernetesApiServiceDiscovery.scala [214:228]
private def readConfigVarFromFilesystem(path: String, name: String): Option[String] = {
val file = Paths.get(path)
if (Files.exists(file)) {
try {
Some(new String(Files.readAllBytes(file), "utf-8"))
} catch {
case NonFatal(e) =>
log.error(e, "Error reading {} from {}", name, path)
None
}
} else {
log.warning("Unable to read {} from {} because it doesn't exist.", name, path)
None
}
}